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_; |