OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SERVICES_SHELL_PUBLIC_CPP_CONNECTION_H_ | 5 #ifndef SERVICES_SHELL_PUBLIC_CPP_CONNECTION_H_ |
6 #define SERVICES_SHELL_PUBLIC_CPP_CONNECTION_H_ | 6 #define SERVICES_SHELL_PUBLIC_CPP_CONNECTION_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 // Register a closure to be run when the connection has been completed by the | 137 // Register a closure to be run when the connection has been completed by the |
138 // shell and remote metadata is available. Useful only for connections created | 138 // shell and remote metadata is available. Useful only for connections created |
139 // via Connector::Connect(). Once the connection is complete, metadata is | 139 // via Connector::Connect(). Once the connection is complete, metadata is |
140 // available immediately. | 140 // available immediately. |
141 virtual void AddConnectionCompletedClosure(const base::Closure& callback) = 0; | 141 virtual void AddConnectionCompletedClosure(const base::Closure& callback) = 0; |
142 | 142 |
143 // Returns true if the Shell allows |interface_name| to be exposed to the | 143 // Returns true if the Shell allows |interface_name| to be exposed to the |
144 // remote application. | 144 // remote application. |
145 virtual bool AllowsInterface(const std::string& interface_name) const = 0; | 145 virtual bool AllowsInterface(const std::string& interface_name) const = 0; |
146 | 146 |
147 // Returns a raw pointer to the InterfaceProvider at the remote end. | |
148 virtual mojom::InterfaceProvider* GetRemoteInterfaceProvider() = 0; | |
149 | |
150 // Returns the InterfaceRegistry that implements the mojom::InterfaceProvider | 147 // Returns the InterfaceRegistry that implements the mojom::InterfaceProvider |
151 // exposed to the remote application. | 148 // exposed to the remote application. |
152 virtual InterfaceRegistry* GetInterfaceRegistry() = 0; | 149 virtual InterfaceRegistry* GetInterfaceRegistry() = 0; |
153 | 150 |
154 // Returns an object encapsulating a remote InterfaceProvider. | 151 // Returns an object encapsulating a remote InterfaceProvider. |
155 virtual InterfaceProvider* GetRemoteInterfaces() = 0; | 152 virtual InterfaceProvider* GetRemoteInterfaces() = 0; |
156 | 153 |
157 protected: | 154 protected: |
158 virtual base::WeakPtr<Connection> GetWeakPtr() = 0; | 155 virtual base::WeakPtr<Connection> GetWeakPtr() = 0; |
159 }; | 156 }; |
160 | 157 |
161 } // namespace shell | 158 } // namespace shell |
162 | 159 |
163 #endif // SERVICES_SHELL_PUBLIC_CPP_CONNECTION_H_ | 160 #endif // SERVICES_SHELL_PUBLIC_CPP_CONNECTION_H_ |
OLD | NEW |