| OLD | NEW |
| 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_BINDING_STATE_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDING_STATE_H_ |
| 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDING_STATE_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDING_STATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 endpoint_client_->set_connection_error_with_reason_handler(error_handler); | 61 endpoint_client_->set_connection_error_with_reason_handler(error_handler); |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool is_bound() const { return !!router_; } | 64 bool is_bound() const { return !!router_; } |
| 65 | 65 |
| 66 MessagePipeHandle handle() const { | 66 MessagePipeHandle handle() const { |
| 67 DCHECK(is_bound()); | 67 DCHECK(is_bound()); |
| 68 return router_->handle(); | 68 return router_->handle(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 void EnableNestedDispatch(bool enabled); | |
| 72 | |
| 73 void FlushForTesting(); | 71 void FlushForTesting(); |
| 74 | 72 |
| 75 void EnableTestingMode(); | 73 void EnableTestingMode(); |
| 76 | 74 |
| 77 protected: | 75 protected: |
| 78 void BindInternal(ScopedMessagePipeHandle handle, | 76 void BindInternal(ScopedMessagePipeHandle handle, |
| 79 scoped_refptr<base::SingleThreadTaskRunner> runner, | 77 scoped_refptr<base::SingleThreadTaskRunner> runner, |
| 80 const char* interface_name, | 78 const char* interface_name, |
| 81 std::unique_ptr<MessageReceiver> request_validator, | 79 std::unique_ptr<MessageReceiver> request_validator, |
| 82 bool passes_associated_kinds, | 80 bool passes_associated_kinds, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 private: | 119 private: |
| 122 typename Interface::template Stub_<ImplRefTraits> stub_; | 120 typename Interface::template Stub_<ImplRefTraits> stub_; |
| 123 | 121 |
| 124 DISALLOW_COPY_AND_ASSIGN(BindingState); | 122 DISALLOW_COPY_AND_ASSIGN(BindingState); |
| 125 }; | 123 }; |
| 126 | 124 |
| 127 } // namesapce internal | 125 } // namesapce internal |
| 128 } // namespace mojo | 126 } // namespace mojo |
| 129 | 127 |
| 130 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDING_STATE_H_ | 128 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDING_STATE_H_ |
| OLD | NEW |