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)); |