aboutsummaryrefslogtreecommitdiff
path: root/mojo/public/cpp/bindings/lib/associated_interface_ptr.cc
blob: 78281eda9a9eb4048f4c610ebadd23977c3ea675 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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