New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 660736 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 571155
issue 441957



Sign in to add a comment

Make "media" a standalone service on Chromecast

Project Member Reported by s...@chromium.org, Oct 30 2016

Issue description

Conditionally build "service:media" as a standalone service. This will allow the service to be loaded into the browser process as a shared library. Eventually this service may run in its own process.

An important benefit of this effort will be to remove media service dependencies on content/ and net/. It will also require that we remove assumptions that the media service runs in the browser process.

 
Cc: xhw...@chromium.org
Before I look at the CL, could you please remind me why the current way we register ProvisionFetcher service on Android doesn't work for Cast? Even though service:media is running as a standalone library, CreateInterfaceFactory() [1] will still be called with the host/frame services. I am confused why this won't work for you. I must be missing some big picture here :)

[1] https://cs.chromium.org/chromium/src/media/mojo/interfaces/media_service.mojom?rcl=0&l=11

Comment 2 by s...@chromium.org, Nov 4 2016

Xiaohan: Thanks for your question.

The CL in question (crrev.com/2472203002) is not directly related to how "service:media" runs (embedded vs. standalone). It adds support for clients of this service that are not in the render process. We have Cast-specific code running in the browser that needs to consume "service:media". This code has absolutely no understanding of the render process, yet needs a way to provision the device for Widevine. 

We could inject the interface as we are doing in render_frame_host_impl.cc, but using the service Connector is a much more extensible way to do this, especially considering that ProvisionFetcher is a Context-wide concept, rather than a RenderFrame-wide concept.

Comment 3 by s...@chromium.org, Nov 4 2016

Follow-up on #2:

Perhaps it was confusing for me to tag this bug on that change. Moving "service:media" into a native lib will require breaking a lot of content/ dependencies that we have in our internal code, so it is somewhat related to this bug, though not directly :)

Comment 4 by alokp@chromium.org, Nov 4 2016

Blocking: 571155
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a0da430a19a674050860c392ca879fc9c82b559f

commit a0da430a19a674050860c392ca879fc9c82b559f
Author: slan <slan@chromium.org>
Date: Mon Nov 07 17:37:01 2016

Move all ProvisionFetcher classes out of android/ subdirectories.

The Cast Linux build will use this interface to provision devices
from the "media" service. Move these classes into general subdirs and
update BUILD.gn files so that these build on Linux.

The only non-mechanical change in this CL is that
content::CreateProvisionFetcher() now takes a net::URLRequestContextGetter*
instead of a RenderFrameHost*. This will allow more flexibility for content
embedders like Chromecast to use this class.

BUG=660736
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2469863010
Cr-Commit-Position: refs/heads/master@{#430308}

[modify] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/chrome/browser/media/android/cdm/media_drm_credential_manager.cc
[modify] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/chrome/browser/media/android/cdm/media_drm_credential_manager.h
[modify] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/content/browser/BUILD.gn
[modify] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/content/browser/frame_host/render_frame_host_impl.cc
[rename] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/content/browser/media/url_provision_fetcher.cc
[rename] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/content/browser/media/url_provision_fetcher.h
[modify] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/content/public/browser/BUILD.gn
[rename] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/content/public/browser/provision_fetcher_factory.h
[rename] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/content/public/browser/provision_fetcher_impl.cc
[rename] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/content/public/browser/provision_fetcher_impl.h
[modify] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/media/base/BUILD.gn
[modify] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/media/base/android/BUILD.gn
[modify] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/media/base/android/android_cdm_factory.h
[modify] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/media/base/android/media_drm_bridge.cc
[modify] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/media/base/android/media_drm_bridge.h
[modify] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/media/base/android/media_drm_bridge_unittest.cc
[rename] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/media/base/provision_fetcher.h
[modify] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/media/mojo/interfaces/BUILD.gn
[modify] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/media/mojo/interfaces/provision_fetcher.mojom
[modify] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/media/mojo/services/BUILD.gn
[modify] https://crrev.com/a0da430a19a674050860c392ca879fc9c82b559f/media/mojo/services/mojo_provision_fetcher.h

Comment 6 by xhw...@chromium.org, Nov 11 2016

Blocking: 441957

Comment 7 by yucliu@chromium.org, Nov 11 2016

Cc: yucliu@chromium.org
Project Member

Comment 8 by bugdroid1@chromium.org, Dec 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e18fa6be27931989ea9197d629e467d2d6866fdd

commit e18fa6be27931989ea9197d629e467d2d6866fdd
Author: slan <slan@chromium.org>
Date: Sat Dec 03 01:24:51 2016

Pass Connector* into MojoMediaClient::Initialize().

Pass the Connector* provided by the service:media's ServiceContext into
MojoMediaClient::Initialize(), allowing MojoMediaClient implementations
to connect to interfaces exposed by other services. Also makes the
InterfaceProvider passed in CreateInterfaceFactory optional to eliminate
unecessary complexity, and corrects an error in media_manifest.json.

BUG=660736

Review-Url: https://codereview.chromium.org/2544523002
Cr-Commit-Position: refs/heads/master@{#436123}

[modify] https://crrev.com/e18fa6be27931989ea9197d629e467d2d6866fdd/chromecast/media/service/cast_mojo_media_client.cc
[modify] https://crrev.com/e18fa6be27931989ea9197d629e467d2d6866fdd/chromecast/media/service/cast_mojo_media_client.h
[modify] https://crrev.com/e18fa6be27931989ea9197d629e467d2d6866fdd/media/mojo/interfaces/media_service.mojom
[modify] https://crrev.com/e18fa6be27931989ea9197d629e467d2d6866fdd/media/mojo/services/android_mojo_media_client.cc
[modify] https://crrev.com/e18fa6be27931989ea9197d629e467d2d6866fdd/media/mojo/services/android_mojo_media_client.h
[modify] https://crrev.com/e18fa6be27931989ea9197d629e467d2d6866fdd/media/mojo/services/media_service.cc
[modify] https://crrev.com/e18fa6be27931989ea9197d629e467d2d6866fdd/media/mojo/services/media_service.h
[modify] https://crrev.com/e18fa6be27931989ea9197d629e467d2d6866fdd/media/mojo/services/mojo_media_client.cc
[modify] https://crrev.com/e18fa6be27931989ea9197d629e467d2d6866fdd/media/mojo/services/mojo_media_client.h
[modify] https://crrev.com/e18fa6be27931989ea9197d629e467d2d6866fdd/media/mojo/services/test_mojo_media_client.cc
[modify] https://crrev.com/e18fa6be27931989ea9197d629e467d2d6866fdd/media/mojo/services/test_mojo_media_client.h

Project Member

Comment 9 by bugdroid1@chromium.org, Dec 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/10f4f12110902b827554d592f9ba146b0b28ce35

commit 10f4f12110902b827554d592f9ba146b0b28ce35
Author: slan <slan@chromium.org>
Date: Tue Dec 20 03:00:25 2016

[Chromecast][Clean-Up] Remove CastCdmProxy.

Now that the "media" service is used on every Cast build, we no longer
need this thread-hopping class.

BUG=660736
Test: Cast compiles, no functionality changes

Change-Id: I89639dfb874e1a3b46d63666b83f0227250e526b
Review-Url: https://codereview.chromium.org/2586353002
Cr-Commit-Position: refs/heads/master@{#439684}

[modify] https://crrev.com/10f4f12110902b827554d592f9ba146b0b28ce35/chromecast/media/cdm/BUILD.gn
[modify] https://crrev.com/10f4f12110902b827554d592f9ba146b0b28ce35/chromecast/media/cdm/cast_cdm_factory.cc
[delete] https://crrev.com/8d3c47d04559bbc8e95348ab7fae3cce1947af93/chromecast/media/cdm/cast_cdm_proxy.cc
[delete] https://crrev.com/8d3c47d04559bbc8e95348ab7fae3cce1947af93/chromecast/media/cdm/cast_cdm_proxy.h

Sign in to add a comment