Index: content/gpu/gpu_service_factory.cc |
diff --git a/content/gpu/gpu_service_factory.cc b/content/gpu/gpu_service_factory.cc |
index 50696ce42043bcee8ad5b7ef5b4f9b0ccec75eac..5625a63a5a6470bb0c0c94aafa936e5375adc0df 100644 |
--- a/content/gpu/gpu_service_factory.cc |
+++ b/content/gpu/gpu_service_factory.cc |
@@ -4,22 +4,32 @@ |
#include "content/gpu/gpu_service_factory.h" |
+#include <memory> |
+ |
+#include "base/threading/thread_task_runner_handle.h" |
+ |
#if defined(ENABLE_MOJO_MEDIA_IN_GPU_PROCESS) |
#include "base/bind.h" |
-#include "base/bind_helpers.h" |
#include "media/mojo/services/media_service_factory.h" // nogncheck |
#endif |
namespace content { |
-GpuServiceFactory::GpuServiceFactory() {} |
+GpuServiceFactory::GpuServiceFactory( |
+ base::WeakPtr<media::MediaGpuChannelManager> media_gpu_channel_manager) { |
+#if defined(ENABLE_MOJO_MEDIA_IN_GPU_PROCESS) |
+ task_runner_ = base::ThreadTaskRunnerHandle::Get(); |
+ media_gpu_channel_manager_ = std::move(media_gpu_channel_manager); |
+#endif |
+} |
GpuServiceFactory::~GpuServiceFactory() {} |
void GpuServiceFactory::RegisterServices(ServiceMap* services) { |
#if defined(ENABLE_MOJO_MEDIA_IN_GPU_PROCESS) |
ServiceInfo info; |
- info.factory = base::Bind(&media::CreateMediaService); |
+ info.factory = base::Bind(&media::CreateGpuMediaService, task_runner_, |
+ media_gpu_channel_manager_); |
info.use_own_thread = true; |
services->insert(std::make_pair("media", info)); |
#endif |