OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "mojo/public/cpp/bindings/lib/binding_state.h" | 5 #include "mojo/public/cpp/bindings/lib/binding_state.h" |
6 | 6 |
7 #include "mojo/public/cpp/bindings/lib/control_message_proxy.h" | 7 #include "mojo/public/cpp/bindings/lib/control_message_proxy.h" |
8 | 8 |
9 namespace mojo { | 9 namespace mojo { |
10 namespace internal { | 10 namespace internal { |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 endpoint_client_->control_message_proxy()->FlushForTesting(); | 131 endpoint_client_->control_message_proxy()->FlushForTesting(); |
132 } | 132 } |
133 | 133 |
134 void MultiplexedBindingState::EnableTestingMode() { | 134 void MultiplexedBindingState::EnableTestingMode() { |
135 DCHECK(is_bound()); | 135 DCHECK(is_bound()); |
136 router_->EnableTestingMode(); | 136 router_->EnableTestingMode(); |
137 } | 137 } |
138 | 138 |
139 void MultiplexedBindingState::BindInternal( | 139 void MultiplexedBindingState::BindInternal( |
140 ScopedMessagePipeHandle handle, | 140 ScopedMessagePipeHandle handle, |
141 MultiplexRouter::Config config, | |
142 scoped_refptr<base::SingleThreadTaskRunner> runner, | 141 scoped_refptr<base::SingleThreadTaskRunner> runner, |
143 const char* interface_name, | 142 const char* interface_name, |
144 std::unique_ptr<MessageReceiver> request_validator, | 143 std::unique_ptr<MessageReceiver> request_validator, |
145 bool has_sync_methods, | 144 bool has_sync_methods, |
146 MessageReceiverWithResponderStatus* stub, | 145 MessageReceiverWithResponderStatus* stub, |
147 uint32_t interface_version) { | 146 uint32_t interface_version) { |
148 DCHECK(!router_); | 147 DCHECK(!router_); |
149 | 148 |
150 router_ = new MultiplexRouter(std::move(handle), config, false, runner); | 149 router_ = new MultiplexRouter( |
| 150 std::move(handle), MultiplexRouter::MULTI_INTERFACE, false, runner); |
151 router_->SetMasterInterfaceName(interface_name); | 151 router_->SetMasterInterfaceName(interface_name); |
152 | 152 |
153 endpoint_client_.reset(new InterfaceEndpointClient( | 153 endpoint_client_.reset(new InterfaceEndpointClient( |
154 router_->CreateLocalEndpointHandle(kMasterInterfaceId), stub, | 154 router_->CreateLocalEndpointHandle(kMasterInterfaceId), stub, |
155 std::move(request_validator), has_sync_methods, std::move(runner), | 155 std::move(request_validator), has_sync_methods, std::move(runner), |
156 interface_version)); | 156 interface_version)); |
157 } | 157 } |
158 | 158 |
159 } // namesapce internal | 159 } // namesapce internal |
160 } // namespace mojo | 160 } // namespace mojo |
OLD | NEW |