| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 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 #ifndef CONTENT_BROWSER_MOJO_MOJO_SHELL_CLIENT_HOST_H_ | |
| 6 #define CONTENT_BROWSER_MOJO_MOJO_SHELL_CLIENT_HOST_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/process/process_handle.h" | |
| 11 #include "mojo/shell/public/cpp/identity.h" | |
| 12 #include "mojo/shell/public/interfaces/shell.mojom.h" | |
| 13 | |
| 14 namespace content { | |
| 15 | |
| 16 class RenderProcessHost; | |
| 17 | |
| 18 // Creates a communication channel between the external Mojo shell and the | |
| 19 // child. The server handle of this channel is shared with the external shell | |
| 20 // via Mojo IPC. |child_process_id| and |instance_id| are used to uniquify the | |
| 21 // child in the external shell's instance map. | |
| 22 // | |
| 23 // This returns a token that may be passed to the child process and exchanged | |
| 24 // for a pipe there. That pipe can in turn be passed to | |
| 25 // MojoShellConnectionImpl::BindToMessagePipe() to initialize the child's | |
| 26 // shell connection. | |
| 27 std::string RegisterChildWithExternalShell( | |
| 28 int child_process_id, | |
| 29 int instance_id, | |
| 30 RenderProcessHost* render_process_host); | |
| 31 | |
| 32 // Returns the Identity associated with an instance corresponding to the | |
| 33 // renderer process in shell. This Identity can be passed to Connect() to open a | |
| 34 // new connection to this renderer. | |
| 35 mojo::Identity GetMojoIdentity(RenderProcessHost* render_process_host); | |
| 36 | |
| 37 } // namespace content | |
| 38 | |
| 39 #endif // CONTENT_BROWSER_MOJO_MOJO_SHELL_CLIENT_HOST_H_ | |
| OLD | NEW |