OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
sky
2016/03/08 22:30:23
2016
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_BROWSER_MOJO_MOJO_CHILD_CONNECTION_H_ | |
6 #define CONTENT_BROWSER_MOJO_MOJO_CHILD_CONNECTION_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/process/process_handle.h" | |
11 #include "mojo/shell/public/interfaces/shell.mojom.h" | |
12 | |
13 namespace mojo { | |
14 class Connection; | |
15 } | |
16 | |
17 namespace content { | |
18 | |
19 class RenderProcessHost; | |
20 | |
21 // Establish a mojo::Connection to the child process, using a pipe created for | |
22 // that purpose. Returns a token that should be passed to the child process and | |
23 // exchanged for a pipe there. That pipe can in turn be passed to | |
24 // MojoShellConnectionImpl::BindToMessagePipe() to initialize the child's | |
25 // shell connection. | |
26 std::string MojoConnectToChild(int child_process_id, | |
27 int instance_id, | |
28 RenderProcessHost* render_process_host); | |
29 | |
30 // Returns a mojo connection to the provided render process host. This | |
31 // connection was opened when MojoConnectToChild() was called. | |
32 mojo::Connection* GetMojoConnection(RenderProcessHost* render_process_host); | |
33 | |
34 } // namespace content | |
35 | |
36 #endif // CONTENT_BROWSER_MOJO_MOJO_CHILD_CONNECTION_H_ | |
OLD | NEW |