Descriptionmedia: Add mojo MediaPermission service
The CDM in the MojoMediaApplication needs to check media permissions in
some cases. Today in the non-mojo world the check is done in the browser
process in some ad-hoc places, in BrowserCdmManager on Android and
ChromeCast, and in PlatformVerificationFlow on ChromeOS. Now with
MojoMediaApplication, we have a unified way to host out-of-process CDMs,
we'd like to have a unified way to check the permission as well, e.g.
passing the MediaPermission to the CDM running in MojoMediaApplication.
Note that our CDMs know neither content nor mojo. So to request
permission, it can only talk to media::MediaPermission. Since permission
is hosted in the browser in content, we need some extra plumbing.
With this CL, now we have these interfaces and classes:
- media::MediaPermission: C++ interface in media/
- (new) media::interfaces::MediaPermission: mojo interface in media/
- content::mojom::PermissionService: mojo interface in content/
- content::PermissionServiceContext:
hosts content::mojom::PermissionService
- (moved) content::MediaPermissionDispatcher:
conent::mojom::PermissionService -> media::MediaPermission
- (new) media::MediaPermissionImpl:
media::MediaPermission -> media::interfaces::MediaPermission
- (new) media::MojoMediaPermission:
media::interfaces::MediaPermission -> media::MediaPermission
This is how we plumb media::MediaPermission to a CDM running in the
MojoMediaApplication:
PermissionServiceContext -> MediaPermissionDispatcher ->
MediaPermissionImpl -> mojo IPC -> MojoMediaPermission -> CDM
In the next CL:
- Create MojoMediaPermission in AndroidMojoMediaClient.
- Pass MojoMediaPermission to AndroidCdmFactory and MediaDrmBridge.
- Check protected media identifier permission in MediaDrmBridge.
An alternative solution is to create a MediaPermissionDispatcher in the
process where the MojoMediaApplication is hosted, and plumb it through
to the CDM. With the ServiceRegistry in GPU process, this is prototyped
in https://chromiumcodereview.appspot.com/1837143002/. It seems to have
less layers involved. However, this solution is not generic. We need to
do this differently when hosting the MojoMediaApplication in different
processes. Therefore, the current approach is preferred.
BUG=559839
TEST=Manually tested to verify the permission check is plumbed through.
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation
Patch Set 1 #
Total comments: 2
Messages
Total messages: 14 (4 generated)
|