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

Unified Diff: content/gpu/gpu_process_control_impl.cc

Issue 1934193003: media: Set MediaClientAndroid in the GPU process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 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/DEPS ('k') | content/public/common/content_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_process_control_impl.cc
diff --git a/content/gpu/gpu_process_control_impl.cc b/content/gpu/gpu_process_control_impl.cc
index 07c50169e2f9be5267d8269f48c4f95556923e4a..f0b2489d175ebd8dd5b3fb65ab466534ffe18e1f 100644
--- a/content/gpu/gpu_process_control_impl.cc
+++ b/content/gpu/gpu_process_control_impl.cc
@@ -8,7 +8,11 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "content/common/mojo/static_loader.h"
+#include "content/public/common/content_client.h"
#include "media/mojo/services/mojo_media_application_factory.h"
+#if defined(OS_ANDROID)
+#include "media/base/android/media_client_android.h"
+#endif
#endif
namespace content {
@@ -20,6 +24,11 @@ GpuProcessControlImpl::~GpuProcessControlImpl() {}
void GpuProcessControlImpl::RegisterLoaders(
NameToLoaderMap* name_to_loader_map) {
#if defined(ENABLE_MOJO_MEDIA_IN_GPU_PROCESS)
+#if defined(OS_ANDROID)
+ // Only set once per process instance.
+ media::SetMediaClientAndroid(GetContentClient()->GetMediaClientAndroid());
+#endif
+
(*name_to_loader_map)["mojo:media"] = new StaticLoader(
base::Bind(&media::CreateMojoMediaApplication),
base::Bind(&base::DoNothing));
« no previous file with comments | « content/gpu/DEPS ('k') | content/public/common/content_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698