| Index: mojo/public/cpp/bindings/lib/associated_interface_ptr.cc
|
| diff --git a/mojo/public/cpp/bindings/lib/associated_interface_ptr.cc b/mojo/public/cpp/bindings/lib/associated_interface_ptr.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..78281eda9a9eb4048f4c610ebadd23977c3ea675
|
| --- /dev/null
|
| +++ b/mojo/public/cpp/bindings/lib/associated_interface_ptr.cc
|
| @@ -0,0 +1,18 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "mojo/public/cpp/bindings/associated_interface_ptr.h"
|
| +
|
| +namespace mojo {
|
| +
|
| +void GetIsolatedInterface(ScopedInterfaceEndpointHandle handle) {
|
| + MessagePipe pipe;
|
| + scoped_refptr<internal::MultiplexRouter> router =
|
| + new internal::MultiplexRouter(std::move(pipe.handle0),
|
| + internal::MultiplexRouter::MULTI_INTERFACE,
|
| + false, base::ThreadTaskRunnerHandle::Get());
|
| + router->AssociateInterface(std::move(handle));
|
| +}
|
| +
|
| +} // namespace mojo
|
|
|