Index: content/public/common/mojo_shell_connection.h |
diff --git a/content/public/common/mojo_shell_connection.h b/content/public/common/mojo_shell_connection.h |
index 1fbe2439a4ad789882fe00729c2cebe94c9446dc..63428b46a7f94176ba5a94db8d7094dd1d13ba2d 100644 |
--- a/content/public/common/mojo_shell_connection.h |
+++ b/content/public/common/mojo_shell_connection.h |
@@ -11,7 +11,7 @@ |
#include "content/common/content_export.h" |
#include "content/public/common/mojo_application_info.h" |
#include "services/shell/public/cpp/identity.h" |
-#include "services/shell/public/interfaces/shell_client.mojom.h" |
+#include "services/shell/public/interfaces/service.mojom.h" |
namespace shell { |
class Connection; |
@@ -24,16 +24,16 @@ namespace content { |
// Encapsulates a connection to a //services/shell. |
// Access a global instance on the thread the ShellConnection was bound by |
// calling Holder::Get(). |
-// Clients can add shell::ShellClient implementations whose exposed interfaces |
-// will be exposed to inbound connections to this object's ShellClient. |
+// Clients can add shell::Service implementations whose exposed interfaces |
+// will be exposed to inbound connections to this object's Service. |
// Alternatively clients can define named services that will be constructed when |
// requests for those service names are received. |
// Clients must call any of the registration methods when receiving |
// ContentBrowserClient::RegisterInProcessMojoApplications(). |
class CONTENT_EXPORT MojoShellConnection { |
public: |
- using ShellClientRequestHandler = |
- base::Callback<void(shell::mojom::ShellClientRequest)>; |
+ using ServiceRequestHandler = |
+ base::Callback<void(shell::mojom::ServiceRequest)>; |
using Factory = base::Callback<std::unique_ptr<MojoShellConnection>(void)>; |
// Stores an instance of |connection| in TLS for the current process. Must be |
@@ -57,13 +57,13 @@ class CONTENT_EXPORT MojoShellConnection { |
// Creates a MojoShellConnection from |request|. |
static std::unique_ptr<MojoShellConnection> Create( |
- shell::mojom::ShellClientRequest request); |
+ shell::mojom::ServiceRequest request); |
// Returns the bound shell::ShellConnection object. |
// TODO(rockot): remove. |
virtual shell::ShellConnection* GetShellConnection() = 0; |
- // Returns the shell::Connector received via this connection's ShellClient |
+ // Returns the shell::Connector received via this connection's Service |
// implementation. Use this to initiate connections as this object's Identity. |
virtual shell::Connector* GetConnector() = 0; |
@@ -77,28 +77,27 @@ class CONTENT_EXPORT MojoShellConnection { |
virtual void SetConnectionLostClosure(const base::Closure& closure) = 0; |
// Allows the caller to expose interfaces to the caller using the identity of |
- // this object's ShellClient. As distinct from AddEmbeddedService() and |
- // AddShellClientRequestHandler() which specify unique identities for the |
+ // this object's Service. As distinct from MergeService() and |
+ // AddServiceRequestHandler() which specify unique identities for the |
// registered services. |
- virtual void AddEmbeddedShellClient( |
- std::unique_ptr<shell::ShellClient> shell_client) = 0; |
- virtual void AddEmbeddedShellClient(shell::ShellClient* shell_client) = 0; |
+ virtual void MergeService(std::unique_ptr<shell::Service> service) = 0; |
+ virtual void MergeService(shell::Service* service) = 0; |
- // Adds an embedded service to this connection's ShellClientFactory. |
+ // Adds an embedded service to this connection's ServiceFactory. |
// |info| provides details on how to construct new instances of the |
// service when an incoming connection is made to |name|. |
virtual void AddEmbeddedService(const std::string& name, |
const MojoApplicationInfo& info) = 0; |
- // Adds a generic ShellClientRequestHandler for a given service name. This |
- // will be used to satisfy any incoming calls to CreateShellClient() which |
+ // Adds a generic ServiceRequestHandler for a given service name. This |
+ // will be used to satisfy any incoming calls to CreateService() which |
// reference the given name. |
// |
// For in-process services, it is preferable to use |AddEmbeddedService()| as |
// defined above. |
- virtual void AddShellClientRequestHandler( |
+ virtual void AddServiceRequestHandler( |
const std::string& name, |
- const ShellClientRequestHandler& handler) = 0; |
+ const ServiceRequestHandler& handler) = 0; |
}; |
} // namespace content |