| Index: content/public/common/service_registry.h
|
| diff --git a/content/public/common/service_registry.h b/content/public/common/service_registry.h
|
| index 1ce3b036673b151134781a119657d4f87bab9dc4..8ff9877d15886eb1b913176224181c7fe8cc7e98 100644
|
| --- a/content/public/common/service_registry.h
|
| +++ b/content/public/common/service_registry.h
|
| @@ -51,13 +51,22 @@ class CONTENT_EXPORT ServiceRegistry {
|
| }
|
| virtual void RemoveService(const std::string& service_name) = 0;
|
|
|
| - // Connect to an interface provided by the remote service provider.
|
| + // Connect to an interface provided by the remote service provider. Creates a
|
| + // new message pipe for this connection.
|
| template <typename Interface>
|
| void ConnectToRemoteService(mojo::InterfacePtr<Interface>* ptr) {
|
| mojo::MessagePipe pipe;
|
| ptr->Bind(pipe.handle0.Pass());
|
| ConnectToRemoteService(Interface::Name_, pipe.handle1.Pass());
|
| }
|
| +
|
| + // Connect to an interface provided by the remote service provider, using an
|
| + // existing message pipe.
|
| + template <typename Interface>
|
| + void ConnectToRemoteService(mojo::InterfaceRequest<Interface> request) {
|
| + ConnectToRemoteService(Interface::Name_, request.PassMessagePipe());
|
| + }
|
| +
|
| virtual void ConnectToRemoteService(const base::StringPiece& name,
|
| mojo::ScopedMessagePipeHandle handle) = 0;
|
|
|
|
|