| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 IPC_IPC_CHANNEL_H_ | 5 #ifndef IPC_IPC_CHANNEL_H_ |
| 6 #define IPC_IPC_CHANNEL_H_ | 6 #define IPC_IPC_CHANNEL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 AddGenericAssociatedInterface( | 115 AddGenericAssociatedInterface( |
| 116 Interface::Name_, | 116 Interface::Name_, |
| 117 base::Bind(&BindAssociatedInterfaceRequest<Interface>, factory)); | 117 base::Bind(&BindAssociatedInterfaceRequest<Interface>, factory)); |
| 118 } | 118 } |
| 119 | 119 |
| 120 // Template helper to request a remote associated interface. | 120 // Template helper to request a remote associated interface. |
| 121 template <typename Interface> | 121 template <typename Interface> |
| 122 void GetRemoteAssociatedInterface( | 122 void GetRemoteAssociatedInterface( |
| 123 mojo::AssociatedInterfacePtr<Interface>* proxy) { | 123 mojo::AssociatedInterfacePtr<Interface>* proxy) { |
| 124 mojo::AssociatedInterfaceRequest<Interface> request = | 124 mojo::AssociatedInterfaceRequest<Interface> request = |
| 125 mojo::GetProxy(proxy, GetAssociatedGroup()); | 125 mojo::MakeRequest(proxy, GetAssociatedGroup()); |
| 126 GetGenericRemoteAssociatedInterface( | 126 GetGenericRemoteAssociatedInterface( |
| 127 Interface::Name_, request.PassHandle()); | 127 Interface::Name_, request.PassHandle()); |
| 128 } | 128 } |
| 129 | 129 |
| 130 private: | 130 private: |
| 131 template <typename Interface> | 131 template <typename Interface> |
| 132 static void BindAssociatedInterfaceRequest( | 132 static void BindAssociatedInterfaceRequest( |
| 133 const AssociatedInterfaceFactory<Interface>& factory, | 133 const AssociatedInterfaceFactory<Interface>& factory, |
| 134 mojo::ScopedInterfaceEndpointHandle handle) { | 134 mojo::ScopedInterfaceEndpointHandle handle) { |
| 135 mojo::AssociatedInterfaceRequest<Interface> request; | 135 mojo::AssociatedInterfaceRequest<Interface> request; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 // of Connect(). | 278 // of Connect(). |
| 279 void WillConnect(); | 279 void WillConnect(); |
| 280 | 280 |
| 281 private: | 281 private: |
| 282 bool did_start_connect_ = false; | 282 bool did_start_connect_ = false; |
| 283 }; | 283 }; |
| 284 | 284 |
| 285 } // namespace IPC | 285 } // namespace IPC |
| 286 | 286 |
| 287 #endif // IPC_IPC_CHANNEL_H_ | 287 #endif // IPC_IPC_CHANNEL_H_ |
| OLD | NEW |