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

Unified Diff: content/common/mojo/service_registry_impl.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/common/mime_registry_messages.h ('k') | content/common/mojo/service_registry_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/mojo/service_registry_impl.h
diff --git a/content/common/mojo/service_registry_impl.h b/content/common/mojo/service_registry_impl.h
index 38122cd7027e04a5a752876e25fb96815a5b75eb..923414e98e4f0547aae8572b9b4588159f3618f4 100644
--- a/content/common/mojo/service_registry_impl.h
+++ b/content/common/mojo/service_registry_impl.h
@@ -32,8 +32,10 @@ class CONTENT_EXPORT ServiceRegistryImpl
void Bind(shell::mojom::InterfaceProviderRequest request) override;
void BindRemoteServiceProvider(
shell::mojom::InterfaceProviderPtr service_provider) override;
- void AddService(const std::string& service_name,
- const ServiceFactory& service_factory) override;
+ void AddService(
+ const std::string& service_name,
+ const ServiceFactory& service_factory,
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) override;
void RemoveService(const std::string& service_name) override;
void ConnectToRemoteService(base::StringPiece service_name,
mojo::ScopedMessagePipeHandle handle) override;
@@ -51,12 +53,19 @@ class CONTENT_EXPORT ServiceRegistryImpl
void GetInterface(const mojo::String& name,
mojo::ScopedMessagePipeHandle client_handle) override;
+ static void RunServiceFactoryOnTaskRunner(
+ const ServiceFactory& factory,
+ mojo::ScopedMessagePipeHandle handle);
+
void OnConnectionError();
mojo::Binding<shell::mojom::InterfaceProvider> binding_;
shell::mojom::InterfaceProviderPtr remote_provider_;
- std::map<std::string, ServiceFactory> service_factories_;
+ std::map<
+ std::string,
+ std::pair<ServiceFactory, scoped_refptr<base::SingleThreadTaskRunner>>>
+ service_factories_;
std::queue<std::pair<std::string, mojo::MessagePipeHandle> >
pending_connects_;
« no previous file with comments | « content/common/mime_registry_messages.h ('k') | content/common/mojo/service_registry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698