OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |