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

Side by Side Diff: mojo/public/cpp/bindings/lib/multiplex_router.h

Issue 2660733002: Mojo C++ bindings: introduce an optional array to store transferred interface IDs in messages. (Closed)
Patch Set: . Created 3 years, 10 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
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_LIB_MULTIPLEX_ROUTER_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 DCHECK(thread_checker_.CalledOnValidThread()); 147 DCHECK(thread_checker_.CalledOnValidThread());
148 return connector_.handle(); 148 return connector_.handle();
149 } 149 }
150 150
151 bool SimulateReceivingMessageForTesting(Message* message) { 151 bool SimulateReceivingMessageForTesting(Message* message) {
152 return filters_.Accept(message); 152 return filters_.Accept(message);
153 } 153 }
154 154
155 private: 155 private:
156 class InterfaceEndpoint; 156 class InterfaceEndpoint;
157 class IncomingMessageWrapper;
157 struct Task; 158 struct Task;
158 159
159 ~MultiplexRouter() override; 160 ~MultiplexRouter() override;
160 161
161 // MessageReceiver implementation: 162 // MessageReceiver implementation:
162 bool Accept(Message* message) override; 163 bool Accept(Message* message) override;
163 164
164 // PipeControlMessageHandlerDelegate implementation: 165 // PipeControlMessageHandlerDelegate implementation:
165 bool OnPeerAssociatedEndpointClosed( 166 bool OnPeerAssociatedEndpointClosed(
166 InterfaceId id, 167 InterfaceId id,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // This method is only used by enpoints during sync watching. Therefore, not 202 // This method is only used by enpoints during sync watching. Therefore, not
202 // all sync messages are handled by it. 203 // all sync messages are handled by it.
203 bool ProcessFirstSyncMessageForEndpoint(InterfaceId id); 204 bool ProcessFirstSyncMessageForEndpoint(InterfaceId id);
204 205
205 // Returns true to indicate that |task|/|message| has been processed. 206 // Returns true to indicate that |task|/|message| has been processed.
206 bool ProcessNotifyErrorTask( 207 bool ProcessNotifyErrorTask(
207 Task* task, 208 Task* task,
208 ClientCallBehavior client_call_behavior, 209 ClientCallBehavior client_call_behavior,
209 base::SingleThreadTaskRunner* current_task_runner); 210 base::SingleThreadTaskRunner* current_task_runner);
210 bool ProcessIncomingMessage( 211 bool ProcessIncomingMessage(
211 Message* message, 212 IncomingMessageWrapper* message_wrapper,
212 ClientCallBehavior client_call_behavior, 213 ClientCallBehavior client_call_behavior,
213 base::SingleThreadTaskRunner* current_task_runner); 214 base::SingleThreadTaskRunner* current_task_runner);
214 215
215 void MaybePostToProcessTasks(base::SingleThreadTaskRunner* task_runner); 216 void MaybePostToProcessTasks(base::SingleThreadTaskRunner* task_runner);
216 void LockAndCallProcessTasks(); 217 void LockAndCallProcessTasks();
217 218
218 // Updates the state of |endpoint|. If both the endpoint and its peer have 219 // Updates the state of |endpoint|. If both the endpoint and its peer have
219 // been closed, removes it from |endpoints_|. 220 // been closed, removes it from |endpoints_|.
220 // NOTE: The method may invalidate |endpoint|. 221 // NOTE: The method may invalidate |endpoint|.
221 enum EndpointStateUpdateType { ENDPOINT_CLOSED, PEER_ENDPOINT_CLOSED }; 222 enum EndpointStateUpdateType { ENDPOINT_CLOSED, PEER_ENDPOINT_CLOSED };
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 267
267 bool testing_mode_; 268 bool testing_mode_;
268 269
269 DISALLOW_COPY_AND_ASSIGN(MultiplexRouter); 270 DISALLOW_COPY_AND_ASSIGN(MultiplexRouter);
270 }; 271 };
271 272
272 } // namespace internal 273 } // namespace internal
273 } // namespace mojo 274 } // namespace mojo
274 275
275 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_ 276 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/message_internal.h ('k') | mojo/public/cpp/bindings/lib/multiplex_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698