forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Chromecast] Temporarily allow sync mojo API to get cdm origin
The origin is used for storage isolation. Now the CDM service should call a sync mojo API to get the origin from browser process. Merge-With: eureka-internal/413835 Bug: internal b/159179276 Test: EME on x86 Change-Id: I0dc1292a207b7e05d204436e0f4d45a95857bb34 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2252636 Reviewed-by: Yuchen Liu <yucliu@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Sean Topping <seantopping@chromium.org> Reviewed-by: Ken Rockot <rockot@google.com> Reviewed-by: Xiaohan Wang <xhwang@chromium.org> Commit-Queue: Yuchen Liu <yucliu@chromium.org> Cr-Commit-Position: refs/heads/master@{#780398}
- Loading branch information
Yuchen Liu
authored and
Commit Bot
committed
Jun 19, 2020
1 parent
681b9b2
commit 2fe411a
Showing
9 changed files
with
80 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright 2020 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "chromecast/media/cdm/cast_cdm_origin_provider.h" | ||
|
||
#include "media/mojo/mojom/frame_interface_factory.mojom.h" | ||
#include "mojo/public/cpp/bindings/sync_call_restrictions.h" | ||
|
||
namespace chromecast { | ||
|
||
// static | ||
bool CastCdmOriginProvider::GetCdmOrigin( | ||
::media::mojom::FrameInterfaceFactory* interfaces, | ||
url::Origin* cdm_origin) { | ||
mojo::SyncCallRestrictions::ScopedAllowSyncCall allow_sync_call; | ||
return interfaces->GetCdmOrigin(cdm_origin); | ||
} | ||
|
||
} // namespace chromecast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright 2020 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef CHROMECAST_MEDIA_CDM_CAST_CDM_ORIGIN_PROVIDER_H_ | ||
#define CHROMECAST_MEDIA_CDM_CAST_CDM_ORIGIN_PROVIDER_H_ | ||
|
||
namespace media { | ||
namespace mojom { | ||
class FrameInterfaceFactory; | ||
} // namespace mojom | ||
} // namespace media | ||
|
||
namespace url { | ||
class Origin; | ||
} // namespace url | ||
|
||
namespace chromecast { | ||
|
||
class CastCdmOriginProvider { | ||
public: | ||
// Util function to call sync mojo API to get cdm origin. | ||
// TODO(159346933) Remove once the origin isolation logic is moved outside of | ||
// media service. | ||
static bool GetCdmOrigin(::media::mojom::FrameInterfaceFactory* interfaces, | ||
url::Origin* cdm_origin); | ||
}; | ||
|
||
} // namespace chromecast | ||
|
||
#endif // CHROMECAST_MEDIA_CDM_CAST_CDM_ORIGIN_PROVIDER_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters