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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 // The proxy has been configured. | 338 // The proxy has been configured. |
339 if (proxy_) { | 339 if (proxy_) { |
340 DCHECK(router_); | 340 DCHECK(router_); |
341 DCHECK(endpoint_client_); | 341 DCHECK(endpoint_client_); |
342 return; | 342 return; |
343 } | 343 } |
344 // The object hasn't been bound. | 344 // The object hasn't been bound. |
345 if (!handle_.is_valid()) | 345 if (!handle_.is_valid()) |
346 return; | 346 return; |
347 | 347 |
348 router_ = new MultiplexRouter(true, std::move(handle_), runner_); | 348 router_ = new MultiplexRouter( |
| 349 std::move(handle_), MultiplexRouter::MULTI_INTERFACE, true, runner_); |
349 router_->SetMasterInterfaceName(Interface::Name_); | 350 router_->SetMasterInterfaceName(Interface::Name_); |
350 endpoint_client_.reset(new InterfaceEndpointClient( | 351 endpoint_client_.reset(new InterfaceEndpointClient( |
351 router_->CreateLocalEndpointHandle(kMasterInterfaceId), nullptr, | 352 router_->CreateLocalEndpointHandle(kMasterInterfaceId), nullptr, |
352 base::WrapUnique(new typename Interface::ResponseValidator_()), false, | 353 base::WrapUnique(new typename Interface::ResponseValidator_()), false, |
353 std::move(runner_), | 354 std::move(runner_), |
354 // The version is only queried from the client so the value passed here | 355 // The version is only queried from the client so the value passed here |
355 // will not be used. | 356 // will not be used. |
356 0u)); | 357 0u)); |
357 proxy_.reset(new Proxy(endpoint_client_.get())); | 358 proxy_.reset(new Proxy(endpoint_client_.get())); |
358 proxy_->serialization_context()->group_controller = | 359 proxy_->serialization_context()->group_controller = |
(...skipping 19 matching lines...) Expand all Loading... |
378 | 379 |
379 uint32_t version_; | 380 uint32_t version_; |
380 | 381 |
381 DISALLOW_COPY_AND_ASSIGN(InterfacePtrState); | 382 DISALLOW_COPY_AND_ASSIGN(InterfacePtrState); |
382 }; | 383 }; |
383 | 384 |
384 } // namespace internal | 385 } // namespace internal |
385 } // namespace mojo | 386 } // namespace mojo |
386 | 387 |
387 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_STATE_H_ | 388 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_STATE_H_ |
OLD | NEW |