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

Unified Diff: content/public/common/service_registry.h

Issue 2024363002: Convert MimeRegistry to use mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@message-mojom-magic
Patch Set: Created 4 years, 7 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/content_browser.gypi ('k') | content/renderer/renderer_blink_platform_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/service_registry.h
diff --git a/content/public/common/service_registry.h b/content/public/common/service_registry.h
index e34ed77600dffa1c06f121a07dac7eee3502e1da..03f9f5ae88a0ea3f7c41f10362e69935db1d3646 100644
--- a/content/public/common/service_registry.h
+++ b/content/public/common/service_registry.h
@@ -44,17 +44,24 @@ class CONTENT_EXPORT ServiceRegistry {
// representing that request. Adding a factory for an already registered
// service will override the factory. Existing connections to the service are
// unaffected.
+ //
+ // If a non-null |task_runner| is passed, the factory will be invoked on that
+ // TaskRunner.
template <typename Interface>
void AddService(const base::Callback<void(mojo::InterfaceRequest<Interface>)>&
- service_factory) {
+ service_factory,
+ const scoped_refptr<base::SingleThreadTaskRunner>&
+ task_runner = nullptr) {
AddService(Interface::Name_,
base::Bind(&ServiceRegistry::ForwardToServiceFactory<Interface>,
- service_factory));
+ service_factory),
+ task_runner);
}
virtual void AddService(
const std::string& service_name,
const base::Callback<void(mojo::ScopedMessagePipeHandle)>&
- service_factory) = 0;
+ service_factory,
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) = 0;
// Remove future access to the service implementing Interface. Existing
// connections to the service are unaffected.
« no previous file with comments | « content/content_browser.gypi ('k') | content/renderer/renderer_blink_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698