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 |
71 void FlushForTesting(); | 73 void FlushForTesting(); |
72 | 74 |
73 void EnableTestingMode(); | 75 void EnableTestingMode(); |
74 | 76 |
75 protected: | 77 protected: |
76 void BindInternal(ScopedMessagePipeHandle handle, | 78 void BindInternal(ScopedMessagePipeHandle handle, |
77 scoped_refptr<base::SingleThreadTaskRunner> runner, | 79 scoped_refptr<base::SingleThreadTaskRunner> runner, |
78 const char* interface_name, | 80 const char* interface_name, |
79 std::unique_ptr<MessageReceiver> request_validator, | 81 std::unique_ptr<MessageReceiver> request_validator, |
80 bool passes_associated_kinds, | 82 bool passes_associated_kinds, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 private: | 121 private: |
120 typename Interface::template Stub_<ImplRefTraits> stub_; | 122 typename Interface::template Stub_<ImplRefTraits> stub_; |
121 | 123 |
122 DISALLOW_COPY_AND_ASSIGN(BindingState); | 124 DISALLOW_COPY_AND_ASSIGN(BindingState); |
123 }; | 125 }; |
124 | 126 |
125 } // namesapce internal | 127 } // namesapce internal |
126 } // namespace mojo | 128 } // namespace mojo |
127 | 129 |
128 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDING_STATE_H_ | 130 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDING_STATE_H_ |
OLD | NEW |