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 // available immediately. | 137 // available immediately. |
138 virtual void AddConnectionCompletedClosure(const base::Closure& callback) = 0; | 138 virtual void AddConnectionCompletedClosure(const base::Closure& callback) = 0; |
139 | 139 |
140 // Returns true if the Shell allows |interface_name| to be exposed to the | 140 // Returns true if the Shell allows |interface_name| to be exposed to the |
141 // remote application. | 141 // remote application. |
142 virtual bool AllowsInterface(const std::string& interface_name) const = 0; | 142 virtual bool AllowsInterface(const std::string& interface_name) const = 0; |
143 | 143 |
144 // Returns a raw pointer to the InterfaceProvider at the remote end. | 144 // Returns a raw pointer to the InterfaceProvider at the remote end. |
145 virtual mojom::InterfaceProvider* GetRemoteInterfaceProvider() = 0; | 145 virtual mojom::InterfaceProvider* GetRemoteInterfaceProvider() = 0; |
146 | 146 |
147 protected: | |
148 // Returns the InterfaceRegistry that implements the mojom::InterfaceProvider | 147 // Returns the InterfaceRegistry that implements the mojom::InterfaceProvider |
149 // exposed to the remote application. | 148 // exposed to the remote application. |
150 virtual InterfaceRegistry* GetInterfaceRegistry() = 0; | 149 virtual InterfaceRegistry* GetInterfaceRegistry() = 0; |
151 | 150 |
152 // Returns an object encapsulating a remote InterfaceProvider. | 151 // Returns an object encapsulating a remote InterfaceProvider. |
153 virtual InterfaceProvider* GetRemoteInterfaces() = 0; | 152 virtual InterfaceProvider* GetRemoteInterfaces() = 0; |
154 | 153 |
| 154 protected: |
155 virtual base::WeakPtr<Connection> GetWeakPtr() = 0; | 155 virtual base::WeakPtr<Connection> GetWeakPtr() = 0; |
156 }; | 156 }; |
157 | 157 |
158 } // namespace shell | 158 } // namespace shell |
159 | 159 |
160 #endif // SERVICES_SHELL_PUBLIC_CPP_CONNECTION_H_ | 160 #endif // SERVICES_SHELL_PUBLIC_CPP_CONNECTION_H_ |
OLD | NEW |