| 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 |
| 153 void EnableTestingMode() { | 158 void EnableTestingMode() { |
| 154 ConfigureProxyIfNecessary(); | 159 ConfigureProxyIfNecessary(); |
| 155 router_->EnableTestingMode(); | 160 router_->EnableTestingMode(); |
| 156 } | 161 } |
| 157 | 162 |
| 158 void ForwardMessage(Message message) { | 163 void ForwardMessage(Message message) { |
| 159 ConfigureProxyIfNecessary(); | 164 ConfigureProxyIfNecessary(); |
| 160 endpoint_client_->Accept(&message); | 165 endpoint_client_->Accept(&message); |
| 161 } | 166 } |
| 162 | 167 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 | 222 |
| 218 uint32_t version_; | 223 uint32_t version_; |
| 219 | 224 |
| 220 DISALLOW_COPY_AND_ASSIGN(InterfacePtrState); | 225 DISALLOW_COPY_AND_ASSIGN(InterfacePtrState); |
| 221 }; | 226 }; |
| 222 | 227 |
| 223 } // namespace internal | 228 } // namespace internal |
| 224 } // namespace mojo | 229 } // namespace mojo |
| 225 | 230 |
| 226 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_STATE_H_ | 231 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_STATE_H_ |
| OLD | NEW |