Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(631)

Side by Side Diff: content/browser/mojo/mojo_shell_client_host.h

Issue 1738663002: Hook embedded shell up to MojoShellConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "mojo/shell/public/interfaces/shell.mojom.h" 11 #include "mojo/shell/public/interfaces/shell.mojom.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 class RenderProcessHost; 15 class RenderProcessHost;
16 16
17 // Creates a communication channel between the external Mojo shell and the 17 // Creates a communication channel between the external Mojo shell and the
18 // child. The server handle of this channel is shared with the external shell 18 // child. The server handle of this channel is shared with the external shell
19 // via Mojo IPC. |child_process_id| is used to uniquify the child in the 19 // via Mojo IPC. |child_process_id| and |instance_id| are used to uniquify the
20 // external shell's instance map. 20 // child in the external shell's instance map.
21 void RegisterChildWithExternalShell(int child_process_id, 21 void RegisterChildWithExternalShell(int child_process_id,
22 int instance_id,
22 RenderProcessHost* render_process_host); 23 RenderProcessHost* render_process_host);
23 24
24 // Returns the URL associated with an instance corresponding to the renderer 25 // Returns the URL associated with an instance corresponding to the renderer
25 // process in the external shell. This URL can be passed to 26 // process in the external shell. This URL can be passed to
26 // ConnectToApplication() to open a new connection to this renderer. 27 // ConnectToApplication() to open a new connection to this renderer.
27 std::string GetMojoApplicationInstanceURL( 28 std::string GetMojoApplicationInstanceURL(
28 RenderProcessHost* render_process_host); 29 RenderProcessHost* render_process_host);
29 30
30 // Shares a client handle to the Mojo Shell with the child via Chrome IPC. 31 // Shares a client handle to the Mojo Shell with the child via Chrome IPC.
31 void SendExternalMojoShellHandleToChild(base::ProcessHandle process_handle, 32 void SendExternalMojoShellHandleToChild(base::ProcessHandle process_handle,
32 RenderProcessHost* render_process_host); 33 RenderProcessHost* render_process_host);
33 34
34 // Constructs a Capability Filter for the renderer's application instance in the 35 // Constructs a Capability Filter for the renderer's application instance in the
35 // external shell. This contains the restrictions imposed on what applications 36 // external shell. This contains the restrictions imposed on what applications
36 // and interfaces the renderer can see. The implementation lives in 37 // and interfaces the renderer can see. The implementation lives in
37 // renderer_capability_filter.cc so that it can be subject to specific security 38 // renderer_capability_filter.cc so that it can be subject to specific security
38 // review. 39 // review.
39 mojo::shell::mojom::CapabilityFilterPtr CreateCapabilityFilterForRenderer(); 40 mojo::shell::mojom::CapabilityFilterPtr CreateCapabilityFilterForRenderer();
40 41
41 } // namespace content 42 } // namespace content
42 43
43 #endif // CONTENT_BROWSER_MOJO_MOJO_SHELL_CLIENT_HOST_H_ 44 #endif // CONTENT_BROWSER_MOJO_MOJO_SHELL_CLIENT_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/child_process_security_policy_unittest.cc ('k') | content/browser/mojo/mojo_shell_client_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698