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

Unified Diff: content/gpu/gpu_service_factory.cc

Issue 2382103002: media: Add GpuMojoMediaClient. (Closed)
Patch Set: nogncheck Created 4 years 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_service_factory.h ('k') | media/gpu/ipc/service/media_gpu_channel_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/gpu/gpu_service_factory.h ('k') | media/gpu/ipc/service/media_gpu_channel_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698