1 // Copyright 2017 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" 6 7 namespace mojo { 8 AssociateWithDisconnectedPipe(ScopedInterfaceEndpointHandle handle)9void AssociateWithDisconnectedPipe(ScopedInterfaceEndpointHandle handle) { 10 MessagePipe pipe; 11 scoped_refptr<internal::MultiplexRouter> router = 12 new internal::MultiplexRouter( 13 std::move(pipe.handle0), internal::MultiplexRouter::MULTI_INTERFACE, 14 false, base::SequencedTaskRunnerHandle::Get()); 15 router->AssociateInterface(std::move(handle)); 16 } 17 18 } // namespace mojo 19