Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(904)

Unified Diff: content/gpu/gpu_child_thread.cc

Issue 2864603002: Provide callback to create mojo AndroidOverlays to AVDA. (Closed)
Patch Set: rebased Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/gpu/gpu_child_thread.h ('k') | media/base/android_overlay_mojo_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/gpu/gpu_child_thread.h ('k') | media/base/android_overlay_mojo_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698