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

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

Issue 1811433002: [mojo-edk] Expose notification source to MojoWatch callbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename Created 4 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
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 EnableImmediateDispatchOfEventsFromSameThread(bool enabled) {
yzshen1 2016/03/16 18:31:33 nit: DCHECK(thread_checker_.CalledOnValidThread())
150 connector_.EnableImmediateDispatchOfEventsFromSameThread(enabled);
151 }
152
148 private: 153 private:
149 friend class base::RefCountedDeleteOnMessageLoop<MultiplexRouter>; 154 friend class base::RefCountedDeleteOnMessageLoop<MultiplexRouter>;
150 friend class base::DeleteHelper<MultiplexRouter>; 155 friend class base::DeleteHelper<MultiplexRouter>;
151 156
152 class InterfaceEndpoint; 157 class InterfaceEndpoint;
153 struct Task; 158 struct Task;
154 159
155 ~MultiplexRouter() override; 160 ~MultiplexRouter() override;
156 161
157 // MessageReceiver implementation: 162 // MessageReceiver implementation:
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 217
213 bool testing_mode_; 218 bool testing_mode_;
214 219
215 DISALLOW_COPY_AND_ASSIGN(MultiplexRouter); 220 DISALLOW_COPY_AND_ASSIGN(MultiplexRouter);
216 }; 221 };
217 222
218 } // namespace internal 223 } // namespace internal
219 } // namespace mojo 224 } // namespace mojo
220 225
221 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_ 226 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698