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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 1685183004: Bootstrap Mojo IPC independent of Chrome IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: and fix posix Created 4 years, 10 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/renderer_host/render_process_host_impl.h ('k') | content/child/child_thread_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 0d62e29ced2559b145dca73b2de51eabfd3b27aa..463377cd19250bc3bd6759d10476ce4718a1bb2e 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -628,7 +628,7 @@ RenderProcessHostImpl::RenderProcessHostImpl(
#endif // USE_ATTACHMENT_BROKER
#if defined(MOJO_SHELL_CLIENT)
- RegisterChildWithExternalShell(id_, this);
+ shell_pipe_token_ = RegisterChildWithExternalShell(id_, this);
#endif
}
@@ -1623,6 +1623,10 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
#if defined(MOJO_SHELL_CLIENT)
if (IsRunningInMojoShell())
renderer_cmd->AppendSwitch(switches::kEnableMojoShellConnection);
+ if (!shell_pipe_token_.empty()) {
+ renderer_cmd->AppendSwitchASCII(switches::kMojoPrimordialPipeToken,
+ shell_pipe_token_);
jam 2016/02/13 04:15:13 You'll want to do the same thing in BrowserChildPr
Ken Rockot(use gerrit already) 2016/02/13 04:35:09 Yeah, I'm intentionally keeping this on render pro
+ }
#endif
}
@@ -2566,21 +2570,6 @@ void RenderProcessHostImpl::OnProcessLaunched() {
Source<RenderProcessHost>(this),
NotificationService::NoDetails());
- if (child_process_launcher_.get()) {
- base::ProcessHandle process_handle =
- child_process_launcher_->GetProcess().Handle();
- mojo::edk::ScopedPlatformHandle client_pipe =
- mojo::edk::ChildProcessLaunched(process_handle);
- Send(new ChildProcessMsg_SetMojoParentPipeHandle(
- IPC::GetFileHandleForProcess(client_pipe.release().handle,
- process_handle, true)));
- }
-
-#if defined(MOJO_SHELL_CLIENT)
- // Send the mojo shell handle to the renderer.
- SendExternalMojoShellHandleToChild(GetHandle(), this);
-#endif
-
// Allow Mojo to be setup before the renderer sees any Chrome IPC messages.
// This way, Mojo can be safely used from the renderer in response to any
// Chrome IPC message.
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/child/child_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698