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

Side by Side Diff: mojo/public/cpp/bindings/lib/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 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>
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // See Binding for details of pause/resume. 86 // See Binding for details of pause/resume.
87 void PauseIncomingMethodCallProcessing() { 87 void PauseIncomingMethodCallProcessing() {
88 DCHECK(thread_checker_.CalledOnValidThread()); 88 DCHECK(thread_checker_.CalledOnValidThread());
89 connector_.PauseIncomingMethodCallProcessing(); 89 connector_.PauseIncomingMethodCallProcessing();
90 } 90 }
91 void ResumeIncomingMethodCallProcessing() { 91 void ResumeIncomingMethodCallProcessing() {
92 DCHECK(thread_checker_.CalledOnValidThread()); 92 DCHECK(thread_checker_.CalledOnValidThread());
93 connector_.ResumeIncomingMethodCallProcessing(); 93 connector_.ResumeIncomingMethodCallProcessing();
94 } 94 }
95 95
96 // See Binding for comments.
97 void EnableImmediateDispatchOfEventsFromSameThread(bool allowed) {
98 DCHECK(thread_checker_.CalledOnValidThread());
99 connector_.EnableImmediateDispatchOfEventsFromSameThread(allowed);
100 }
101
96 // Sets this object to testing mode. 102 // Sets this object to testing mode.
97 // In testing mode: 103 // In testing mode:
98 // - the object is more tolerant of unrecognized response messages; 104 // - the object is more tolerant of unrecognized response messages;
99 // - the connector continues working after seeing errors from its incoming 105 // - the connector continues working after seeing errors from its incoming
100 // receiver. 106 // receiver.
101 void EnableTestingMode(); 107 void EnableTestingMode();
102 108
103 MessagePipeHandle handle() const { return connector_.handle(); } 109 MessagePipeHandle handle() const { return connector_.handle(); }
104 110
105 // Returns true if this Router has any pending callbacks. 111 // Returns true if this Router has any pending callbacks.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 bool encountered_error_; 168 bool encountered_error_;
163 Closure error_handler_; 169 Closure error_handler_;
164 base::ThreadChecker thread_checker_; 170 base::ThreadChecker thread_checker_;
165 base::WeakPtrFactory<Router> weak_factory_; 171 base::WeakPtrFactory<Router> weak_factory_;
166 }; 172 };
167 173
168 } // namespace internal 174 } // namespace internal
169 } // namespace mojo 175 } // namespace mojo
170 176
171 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_ROUTER_H_ 177 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698