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. |