Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(798)

Side by Side Diff: mojo/public/cpp/bindings/interface_endpoint_client.h

Issue 2766523002: mojo: MessageReceiver*::AcceptWithResponder() now take a unique_ptr to the responder (Closed)
Patch Set: comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698