Chromium Code Reviews| Index: services/shell/public/cpp/connection.h |
| diff --git a/services/shell/public/cpp/connection.h b/services/shell/public/cpp/connection.h |
| index 56834d8795195117ddb839a60cd5ced26b2c97e8..05a9b72b5fe8879c758743499ae993516a954f2b 100644 |
| --- a/services/shell/public/cpp/connection.h |
| +++ b/services/shell/public/cpp/connection.h |
| @@ -14,12 +14,14 @@ |
| #include "services/shell/public/cpp/connect.h" |
| #include "services/shell/public/cpp/identity.h" |
| #include "services/shell/public/cpp/interface_registry.h" |
| +#include "services/shell/public/cpp/remote_interface_registry.h" |
| #include "services/shell/public/interfaces/connector.mojom.h" |
| #include "services/shell/public/interfaces/interface_provider.mojom.h" |
| namespace shell { |
| class InterfaceBinder; |
| +class RemoteInterfaceRegistry; |
| // Represents a connection to another application. An instance of this class is |
| // returned from Shell's ConnectToApplication(), and passed to ShellClient's |
| @@ -86,7 +88,7 @@ class Connection { |
| // interface. |
| template <typename Interface> |
| void GetInterface(mojo::InterfacePtr<Interface>* ptr) { |
| - GetInterfaceRegistry()->GetInterface(ptr); |
| + GetRemoteInterfaceRegistry()->GetInterface(ptr); |
| } |
| // Returns true if the remote application has the specified capability class |
| @@ -138,11 +140,14 @@ class Connection { |
| // remote application. |
| virtual bool AllowsInterface(const std::string& interface_name) const = 0; |
| + protected: |
| // Returns the InterfaceRegistry that encapsulates the pair of |
| // InterfaceProviders between this application and the remote. |
|
Ken Rockot(use gerrit already)
2016/06/16 23:48:58
nit: update comment
|
| virtual InterfaceRegistry* GetInterfaceRegistry() = 0; |
| - protected: |
| + // Returns an object encapsulating a remote InterfaceProvider. |
| + virtual RemoteInterfaceRegistry* GetRemoteInterfaceRegistry() = 0; |
| + |
| virtual base::WeakPtr<Connection> GetWeakPtr() = 0; |
| }; |