| 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_INTERFACE_PTR_STATE_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_STATE_H_ |
| 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_STATE_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_STATE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> // For |std::swap()|. | 10 #include <algorithm> // For |std::swap()|. |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // Returns true if bound and awaiting a response to a message. | 143 // Returns true if bound and awaiting a response to a message. |
| 144 bool has_pending_callbacks() const { | 144 bool has_pending_callbacks() const { |
| 145 return endpoint_client_ && endpoint_client_->has_pending_responders(); | 145 return endpoint_client_ && endpoint_client_->has_pending_responders(); |
| 146 } | 146 } |
| 147 | 147 |
| 148 AssociatedGroup* associated_group() { | 148 AssociatedGroup* associated_group() { |
| 149 ConfigureProxyIfNecessary(); | 149 ConfigureProxyIfNecessary(); |
| 150 return endpoint_client_->associated_group(); | 150 return endpoint_client_->associated_group(); |
| 151 } | 151 } |
| 152 | 152 |
| 153 void EnableNestedDispatch(bool enabled) { | |
| 154 ConfigureProxyIfNecessary(); | |
| 155 router_->EnableNestedDispatch(enabled); | |
| 156 } | |
| 157 | |
| 158 void EnableTestingMode() { | 153 void EnableTestingMode() { |
| 159 ConfigureProxyIfNecessary(); | 154 ConfigureProxyIfNecessary(); |
| 160 router_->EnableTestingMode(); | 155 router_->EnableTestingMode(); |
| 161 } | 156 } |
| 162 | 157 |
| 163 void ForwardMessage(Message message) { | 158 void ForwardMessage(Message message) { |
| 164 ConfigureProxyIfNecessary(); | 159 ConfigureProxyIfNecessary(); |
| 165 endpoint_client_->Accept(&message); | 160 endpoint_client_->Accept(&message); |
| 166 } | 161 } |
| 167 | 162 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 217 |
| 223 uint32_t version_; | 218 uint32_t version_; |
| 224 | 219 |
| 225 DISALLOW_COPY_AND_ASSIGN(InterfacePtrState); | 220 DISALLOW_COPY_AND_ASSIGN(InterfacePtrState); |
| 226 }; | 221 }; |
| 227 | 222 |
| 228 } // namespace internal | 223 } // namespace internal |
| 229 } // namespace mojo | 224 } // namespace mojo |
| 230 | 225 |
| 231 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_STATE_H_ | 226 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_STATE_H_ |
| OLD | NEW |