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

Unified Diff: content/gpu/gpu_service_factory.cc

Issue 2382103002: media: Add GpuMojoMediaClient. (Closed)
Patch Set: Add GpuMojoMediaClient. Created 4 years, 1 month 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
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..4b731e63fb23cb9f7b3f9acc00efab5e7bd74b1a 100644
--- a/content/gpu/gpu_service_factory.cc
+++ b/content/gpu/gpu_service_factory.cc
@@ -4,22 +4,29 @@
#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
+#include "media/mojo/services/media_service_factory.h"
#endif
namespace content {
-GpuServiceFactory::GpuServiceFactory() {}
+GpuServiceFactory::GpuServiceFactory(
+ media::MediaGpuChannelManager* media_gpu_channel_manager)
+ : task_runner_(base::ThreadTaskRunnerHandle::Get()),
+ media_gpu_channel_manager_(media_gpu_channel_manager) {}
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

Powered by Google App Engine
This is Rietveld 408576698