| Index: content/gpu/gpu_child_thread.cc
|
| diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
|
| index 2258ec99b1ced984fe63aa2b279a43ea8af5ecd7..5b63f9fa93d40f937423c893a332ba2d81bb6cb0 100644
|
| --- a/content/gpu/gpu_child_thread.cc
|
| +++ b/content/gpu/gpu_child_thread.cc
|
| @@ -36,6 +36,7 @@
|
|
|
| #if defined(OS_ANDROID)
|
| #include "media/base/android/media_drm_bridge_client.h"
|
| +#include "media/mojo/clients/mojo_android_overlay.h"
|
| #endif
|
|
|
| namespace content {
|
| @@ -284,6 +285,11 @@ void GpuChildThread::CreateGpuService(
|
| service_factory_.reset(new GpuServiceFactory(
|
| gpu_service_->media_gpu_channel_manager()->AsWeakPtr()));
|
|
|
| +#if defined(OS_ANDROID)
|
| + gpu_service_->media_gpu_channel_manager()->SetOverlayFactory(
|
| + base::Bind(&GpuChildThread::CreateAndroidOverlay));
|
| +#endif
|
| +
|
| if (GetContentClient()->gpu()) // NULL in tests.
|
| GetContentClient()->gpu()->GpuServiceInitialized(gpu_preferences);
|
|
|
| @@ -305,4 +311,17 @@ void GpuChildThread::BindServiceFactoryRequest(
|
| std::move(request));
|
| }
|
|
|
| +#if defined(OS_ANDROID)
|
| +// static
|
| +std::unique_ptr<media::AndroidOverlay> GpuChildThread::CreateAndroidOverlay(
|
| + const base::UnguessableToken& routing_token,
|
| + media::AndroidOverlayConfig config) {
|
| + media::mojom::AndroidOverlayProviderPtr provider_ptr;
|
| + ChildThread::Get()->GetConnector()->BindInterface(
|
| + content::mojom::kBrowserServiceName, &provider_ptr);
|
| + return base::MakeUnique<media::MojoAndroidOverlay>(
|
| + std::move(provider_ptr), std::move(config), routing_token);
|
| +}
|
| +#endif
|
| +
|
| } // namespace content
|
|
|