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_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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 DCHECK(thread_checker_.CalledOnValidThread()); | 138 DCHECK(thread_checker_.CalledOnValidThread()); |
139 return connector_.is_valid(); | 139 return connector_.is_valid(); |
140 } | 140 } |
141 | 141 |
142 // TODO(yzshen): consider removing this getter. | 142 // TODO(yzshen): consider removing this getter. |
143 MessagePipeHandle handle() const { | 143 MessagePipeHandle handle() const { |
144 DCHECK(thread_checker_.CalledOnValidThread()); | 144 DCHECK(thread_checker_.CalledOnValidThread()); |
145 return connector_.handle(); | 145 return connector_.handle(); |
146 } | 146 } |
147 | 147 |
| 148 // See Binding for comments. |
| 149 void SetAllowSyncDispatch(bool allowed); |
| 150 |
148 private: | 151 private: |
149 friend class base::RefCountedDeleteOnMessageLoop<MultiplexRouter>; | 152 friend class base::RefCountedDeleteOnMessageLoop<MultiplexRouter>; |
150 friend class base::DeleteHelper<MultiplexRouter>; | 153 friend class base::DeleteHelper<MultiplexRouter>; |
151 | 154 |
152 class InterfaceEndpoint; | 155 class InterfaceEndpoint; |
153 struct Task; | 156 struct Task; |
154 | 157 |
155 ~MultiplexRouter() override; | 158 ~MultiplexRouter() override; |
156 | 159 |
157 // MessageReceiver implementation: | 160 // MessageReceiver implementation: |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 215 |
213 bool testing_mode_; | 216 bool testing_mode_; |
214 | 217 |
215 DISALLOW_COPY_AND_ASSIGN(MultiplexRouter); | 218 DISALLOW_COPY_AND_ASSIGN(MultiplexRouter); |
216 }; | 219 }; |
217 | 220 |
218 } // namespace internal | 221 } // namespace internal |
219 } // namespace mojo | 222 } // namespace mojo |
220 | 223 |
221 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_ | 224 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_ |
OLD | NEW |