| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_GROUP_CONTROLLER_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_GROUP_CONTROLLER_H_ |
| 6 #define MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_GROUP_CONTROLLER_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_GROUP_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // locally; while |remote_endpoint| is sent over the message pipe. | 31 // locally; while |remote_endpoint| is sent over the message pipe. |
| 32 virtual void CreateEndpointHandlePair( | 32 virtual void CreateEndpointHandlePair( |
| 33 ScopedInterfaceEndpointHandle* local_endpoint, | 33 ScopedInterfaceEndpointHandle* local_endpoint, |
| 34 ScopedInterfaceEndpointHandle* remote_endpoint) = 0; | 34 ScopedInterfaceEndpointHandle* remote_endpoint) = 0; |
| 35 | 35 |
| 36 // Creates an interface endpoint handle from a given interface ID. The handle | 36 // Creates an interface endpoint handle from a given interface ID. The handle |
| 37 // is used locally. | 37 // is used locally. |
| 38 // Typically, this method is used to (1) create an endpoint handle for the | 38 // Typically, this method is used to (1) create an endpoint handle for the |
| 39 // master interface; or (2) create an endpoint handle on receiving an | 39 // master interface; or (2) create an endpoint handle on receiving an |
| 40 // interface ID from the message pipe. | 40 // interface ID from the message pipe. |
| 41 // |
| 42 // On failure, the method returns an invalid handle. Usually that is because |
| 43 // the ID has already been used to create a handle. |
| 41 virtual ScopedInterfaceEndpointHandle CreateLocalEndpointHandle( | 44 virtual ScopedInterfaceEndpointHandle CreateLocalEndpointHandle( |
| 42 InterfaceId id) = 0; | 45 InterfaceId id) = 0; |
| 43 | 46 |
| 44 // Closes an interface endpoint handle. | 47 // Closes an interface endpoint handle. |
| 45 virtual void CloseEndpointHandle( | 48 virtual void CloseEndpointHandle( |
| 46 InterfaceId id, | 49 InterfaceId id, |
| 47 bool is_local, | 50 bool is_local, |
| 48 const base::Optional<DisconnectReason>& reason) = 0; | 51 const base::Optional<DisconnectReason>& reason) = 0; |
| 49 | 52 |
| 50 // Attaches a client to the specified endpoint to send and receive messages. | 53 // Attaches a client to the specified endpoint to send and receive messages. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 75 ScopedInterfaceEndpointHandle CreateScopedInterfaceEndpointHandle( | 78 ScopedInterfaceEndpointHandle CreateScopedInterfaceEndpointHandle( |
| 76 InterfaceId id, | 79 InterfaceId id, |
| 77 bool is_local); | 80 bool is_local); |
| 78 | 81 |
| 79 virtual ~AssociatedGroupController(); | 82 virtual ~AssociatedGroupController(); |
| 80 }; | 83 }; |
| 81 | 84 |
| 82 } // namespace mojo | 85 } // namespace mojo |
| 83 | 86 |
| 84 #endif // MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_GROUP_CONTROLLER_H_ | 87 #endif // MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_GROUP_CONTROLLER_H_ |
| OLD | NEW |