Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_MOJO_MOJO_SHELL_CLIENT_HOST_H_ | 5 #ifndef CONTENT_BROWSER_MOJO_MOJO_SHELL_CLIENT_HOST_H_ |
| 6 #define CONTENT_BROWSER_MOJO_MOJO_SHELL_CLIENT_HOST_H_ | 6 #define CONTENT_BROWSER_MOJO_MOJO_SHELL_CLIENT_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 |
| 14 class RenderProcessHost; | 14 class RenderProcessHost; |
| 15 | 15 |
| 16 // Creates a communication channel between the external Mojo shell and the | 16 // Creates a communication channel between the external Mojo shell and the |
| 17 // child. The server handle of this channel is shared with the external shell | 17 // child. The server handle of this channel is shared with the external shell |
| 18 // via Mojo IPC and the client handle is shared with the child via Chrome IPC. | 18 // via Mojo IPC. |child_process_id| is used to uniquify the child in the |
| 19 // |child_process_id| is used to uniquify the child in the external shell's | 19 // external shell's instance map. |
| 20 // instance map. | |
| 21 void RegisterChildWithExternalShell(int child_process_id, | 20 void RegisterChildWithExternalShell(int child_process_id, |
| 22 base::ProcessHandle process_handle, | |
| 23 RenderProcessHost* render_process_host); | 21 RenderProcessHost* render_process_host); |
| 24 | 22 |
| 25 // Returns the URL associated with an instance corresponding to the renderer | 23 // Returns the URL associated with an instance corresponding to the renderer |
| 26 // process in the external shell. This URL can be passed to | 24 // process in the external shell. This URL can be passed to |
| 27 // ConnectToApplication() to open a new connection to this renderer. | 25 // ConnectToApplication() to open a new connection to this renderer. |
| 28 std::string GetMojoApplicationInstanceURL( | 26 std::string GetMojoApplicationInstanceURL( |
| 29 RenderProcessHost* render_process_host); | 27 RenderProcessHost* render_process_host); |
| 30 | 28 |
| 29 // Shares a client handle to the Mojo Shell with the child via Chrome IPC. | |
| 30 void BindExternalMojoShellHandle(base::ProcessHandle process_handle, | |
|
Ben Goodger (Google)
2015/11/25 20:28:14
SendExternalShellHandleToChild()
Fady Samuel
2015/11/25 20:46:50
Done.
| |
| 31 RenderProcessHost* render_process_host); | |
| 32 | |
| 31 } // namespace content | 33 } // namespace content |
| 32 | 34 |
| 33 #endif // CONTENT_BROWSER_MOJO_MOJO_SHELL_CLIENT_HOST_H_ | 35 #endif // CONTENT_BROWSER_MOJO_MOJO_SHELL_CLIENT_HOST_H_ |
| OLD | NEW |