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

Unified Diff: content/gpu/gpu_child_thread.cc

Issue 2864603002: Provide callback to create mojo AndroidOverlays to AVDA. (Closed)
Patch Set: Revert to callback from gpu_child_thread. 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 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,
jbauman 2017/05/12 20:57:39 Could you make this static (so we don't need base:
liberato (no reviews please) 2017/05/12 21:10:26 Done.
+ 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