OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_INTERFACE_ENDPOINT_CLIENT_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_ENDPOINT_CLIENT_H_ |
6 #define MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_ENDPOINT_CLIENT_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_ENDPOINT_CLIENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // and notifies all interfaces running on this pipe. | 89 // and notifies all interfaces running on this pipe. |
90 void RaiseError(); | 90 void RaiseError(); |
91 | 91 |
92 void CloseWithReason(uint32_t custom_reason, const std::string& description); | 92 void CloseWithReason(uint32_t custom_reason, const std::string& description); |
93 | 93 |
94 // MessageReceiverWithResponder implementation: | 94 // MessageReceiverWithResponder implementation: |
95 // They must only be called when the handle is not in pending association | 95 // They must only be called when the handle is not in pending association |
96 // state. | 96 // state. |
97 bool Accept(Message* message) override; | 97 bool Accept(Message* message) override; |
98 bool AcceptWithResponder(Message* message, | 98 bool AcceptWithResponder(Message* message, |
99 MessageReceiver* responder) override; | 99 std::unique_ptr<MessageReceiver> responder) override; |
100 | 100 |
101 // The following methods are called by the router. They must be called | 101 // The following methods are called by the router. They must be called |
102 // outside of the router's lock. | 102 // outside of the router's lock. |
103 | 103 |
104 // NOTE: |message| must have passed message header validation. | 104 // NOTE: |message| must have passed message header validation. |
105 bool HandleIncomingMessage(Message* message); | 105 bool HandleIncomingMessage(Message* message); |
106 void NotifyError(const base::Optional<DisconnectReason>& reason); | 106 void NotifyError(const base::Optional<DisconnectReason>& reason); |
107 | 107 |
108 // The following methods send interface control messages. | 108 // The following methods send interface control messages. |
109 // They must only be called when the handle is not in pending association | 109 // They must only be called when the handle is not in pending association |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 base::ThreadChecker thread_checker_; | 184 base::ThreadChecker thread_checker_; |
185 | 185 |
186 base::WeakPtrFactory<InterfaceEndpointClient> weak_ptr_factory_; | 186 base::WeakPtrFactory<InterfaceEndpointClient> weak_ptr_factory_; |
187 | 187 |
188 DISALLOW_COPY_AND_ASSIGN(InterfaceEndpointClient); | 188 DISALLOW_COPY_AND_ASSIGN(InterfaceEndpointClient); |
189 }; | 189 }; |
190 | 190 |
191 } // namespace mojo | 191 } // namespace mojo |
192 | 192 |
193 #endif // MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_ENDPOINT_CLIENT_H_ | 193 #endif // MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_ENDPOINT_CLIENT_H_ |
OLD | NEW |