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

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

Issue 1461243002: [OLD ATTEMPT, DO NOT REVIEW] mustash: Enable connections to mus from the Chrome renderer Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Ben's comments Created 5 years 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
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/mojo/mojo_shell_client_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 11
12 namespace mojo {
13 class ApplicationConnection;
14 }
15
12 namespace content { 16 namespace content {
13 17
14 class RenderProcessHost; 18 class RenderProcessHost;
15 19
16 // Creates a communication channel between the external Mojo shell and the 20 // 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 21 // 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. 22 // via Mojo IPC and the client handle is shared with the child via Chrome IPC.
19 // |child_process_id| is used to uniquify the child in the external shell's 23 // |child_process_id| is used to uniquify the child in the external shell's
20 // instance map. 24 // instance map.
21 void RegisterChildWithExternalShell(int child_process_id, 25 void RegisterChildWithExternalShell(int child_process_id,
22 base::ProcessHandle process_handle, 26 base::ProcessHandle process_handle,
23 RenderProcessHost* render_process_host); 27 RenderProcessHost* render_process_host);
24 28
25 // Returns the URL associated with an instance corresponding to the renderer 29 // Returns the URL associated with an instance corresponding to the renderer
26 // process in the external shell. This URL can be passed to 30 // process in the external shell. This URL can be passed to
27 // ConnectToApplication() to open a new connection to this renderer. 31 // ConnectToApplication() to open a new connection to this renderer.
28 std::string GetMojoApplicationInstanceURL( 32 std::string GetMojoApplicationInstanceURL(
29 RenderProcessHost* render_process_host); 33 RenderProcessHost* render_process_host);
30 34
35 // Returns the RenderProcessHost ID associated with the mojo app URL.
36 int GetRenderProcessIDFromConnection(mojo::ApplicationConnection* connection);
37
31 } // namespace content 38 } // namespace content
32 39
33 #endif // CONTENT_BROWSER_MOJO_MOJO_SHELL_CLIENT_HOST_H_ 40 #endif // CONTENT_BROWSER_MOJO_MOJO_SHELL_CLIENT_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.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