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

Unified Diff: content/utility/utility_service_factory.cc

Issue 2643713003: Allow to use the DefaultRendererFactory from a Utility Process (Closed)
Patch Set: Rebase Created 3 years, 10 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/utility/utility_service_factory.h ('k') | media/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/utility/utility_service_factory.cc
diff --git a/content/utility/utility_service_factory.cc b/content/utility/utility_service_factory.cc
index 7c9f18537c142be682f1afbe54ca2996e2d509f6..0281caf75b81449df059ddaed20c8b3c868957b4 100644
--- a/content/utility/utility_service_factory.cc
+++ b/content/utility/utility_service_factory.cc
@@ -5,6 +5,7 @@
#include "content/utility/utility_service_factory.h"
#include "base/bind.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "content/public/common/content_client.h"
#include "content/public/utility/content_utility_client.h"
#include "content/public/utility/utility_thread.h"
@@ -18,7 +19,11 @@
namespace content {
-UtilityServiceFactory::UtilityServiceFactory() {}
+UtilityServiceFactory::UtilityServiceFactory() {
+#if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS)
+ task_runner_ = base::ThreadTaskRunnerHandle::Get();
+#endif
+}
UtilityServiceFactory::~UtilityServiceFactory() {}
@@ -27,7 +32,7 @@ void UtilityServiceFactory::RegisterServices(ServiceMap* services) {
#if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS)
ServiceInfo info;
- info.factory = base::Bind(&media::CreateUtilityMediaService);
+ info.factory = base::Bind(&media::CreateUtilityMediaService, task_runner_);
services->insert(std::make_pair("media", info));
#endif
ServiceInfo shape_detection_info;
« no previous file with comments | « content/utility/utility_service_factory.h ('k') | media/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698