| Index: content/gpu/gpu_child_thread.cc
|
| diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
|
| index 91f1fcb20fe7326accccda5603b5528b5a1e67f9..268f695bcb2c9307c516e4b697f8701e463e005d 100644
|
| --- a/content/gpu/gpu_child_thread.cc
|
| +++ b/content/gpu/gpu_child_thread.cc
|
| @@ -35,6 +35,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 {
|
| @@ -283,6 +284,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::OverlayFactory, base::Unretained(this)));
|
| +#endif
|
| +
|
| if (GetContentClient()->gpu()) // NULL in tests.
|
| GetContentClient()->gpu()->GpuServiceInitialized(gpu_preferences);
|
|
|
| @@ -304,4 +310,16 @@ void GpuChildThread::BindServiceFactoryRequest(
|
| std::move(request));
|
| }
|
|
|
| +#if defined(OS_ANDROID)
|
| +std::unique_ptr<media::AndroidOverlay> GpuChildThread::OverlayFactory(
|
| + 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
|
|
|