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

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

Issue 1823683006: Mojo C++ bindings: sync call support for associated interfaces and master interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_ROUTER_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_ROUTER_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_ROUTER_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_ROUTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <queue> 11 #include <queue>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/threading/thread_checker.h" 16 #include "base/threading/thread_checker.h"
17 #include "mojo/public/cpp/bindings/callback.h" 17 #include "mojo/public/cpp/bindings/callback.h"
18 #include "mojo/public/cpp/bindings/lib/connector.h" 18 #include "mojo/public/cpp/bindings/lib/connector.h"
19 #include "mojo/public/cpp/bindings/lib/filter_chain.h" 19 #include "mojo/public/cpp/bindings/lib/filter_chain.h"
20 20
21 namespace mojo { 21 namespace mojo {
22 namespace internal { 22 namespace internal {
23 23
24 // TODO(yzshen): Consider removing this class and use MultiplexRouter in all
25 // cases. crbug.com/594244
24 class Router : public MessageReceiverWithResponder { 26 class Router : public MessageReceiverWithResponder {
25 public: 27 public:
26 Router(ScopedMessagePipeHandle message_pipe, 28 Router(ScopedMessagePipeHandle message_pipe,
27 FilterChain filters, 29 FilterChain filters,
28 bool expects_sync_requests); 30 bool expects_sync_requests);
29 ~Router() override; 31 ~Router() override;
30 32
31 // Sets the receiver to handle messages read from the message pipe that do 33 // Sets the receiver to handle messages read from the message pipe that do
32 // not have the kMessageIsResponse flag set. 34 // not have the kMessageIsResponse flag set.
33 void set_incoming_receiver(MessageReceiverWithResponderStatus* receiver) { 35 void set_incoming_receiver(MessageReceiverWithResponderStatus* receiver) {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 bool encountered_error_; 164 bool encountered_error_;
163 Closure error_handler_; 165 Closure error_handler_;
164 base::ThreadChecker thread_checker_; 166 base::ThreadChecker thread_checker_;
165 base::WeakPtrFactory<Router> weak_factory_; 167 base::WeakPtrFactory<Router> weak_factory_;
166 }; 168 };
167 169
168 } // namespace internal 170 } // namespace internal
169 } // namespace mojo 171 } // namespace mojo
170 172
171 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_ROUTER_H_ 173 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_ROUTER_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/multiplex_router.cc ('k') | mojo/public/cpp/bindings/lib/router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698