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

Unified Diff: content/browser/mojo/mojo_child_connection.h

Issue 1776513003: Allow client process information to be passed via Connector::Connect(). (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/frame_host/frame_mojo_shell.cc ('k') | content/browser/mojo/mojo_child_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/mojo/mojo_child_connection.h
diff --git a/content/browser/mojo/mojo_child_connection.h b/content/browser/mojo/mojo_child_connection.h
new file mode 100644
index 0000000000000000000000000000000000000000..2270ce72c34d30ab948e7d82223591037f317c2d
--- /dev/null
+++ b/content/browser/mojo/mojo_child_connection.h
@@ -0,0 +1,36 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_MOJO_MOJO_CHILD_CONNECTION_H_
+#define CONTENT_BROWSER_MOJO_MOJO_CHILD_CONNECTION_H_
+
+#include <string>
+
+#include "base/process/process_handle.h"
+#include "mojo/shell/public/interfaces/shell.mojom.h"
+
+namespace mojo {
+class Connection;
+}
+
+namespace content {
+
+class RenderProcessHost;
+
+// Establish a mojo::Connection to the child process, using a pipe created for
+// that purpose. Returns a token that should be passed to the child process and
+// exchanged for a pipe there. That pipe can in turn be passed to
+// MojoShellConnectionImpl::BindToMessagePipe() to initialize the child's
+// shell connection.
+std::string MojoConnectToChild(int child_process_id,
+ int instance_id,
+ RenderProcessHost* render_process_host);
+
+// Returns a mojo connection to the provided render process host. This
+// connection was opened when MojoConnectToChild() was called.
+mojo::Connection* GetMojoConnection(RenderProcessHost* render_process_host);
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_MOJO_MOJO_CHILD_CONNECTION_H_
« no previous file with comments | « content/browser/frame_host/frame_mojo_shell.cc ('k') | content/browser/mojo/mojo_child_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698