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

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

Issue 1748973003: Revert of Bootstrap Mojo IPC independent of Chrome IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 eaaf9578866f079916d0acc4efe87a913b9f3cc7..de6cb37ad67bf21b445ae61c090747f0c43d3601 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -701,7 +701,7 @@
if (channel_)
return true;
- shell_pipe_token_ = RegisterChildWithExternalShell(id_, instance_id_++, this);
+ RegisterChildWithExternalShell(id_, instance_id_++, this);
base::CommandLine::StringType renderer_prefix;
// A command prefix is something prepended to the command line of the spawned
@@ -1626,11 +1626,6 @@
}
}
- if (!shell_pipe_token_.empty()) {
- renderer_cmd->AppendSwitchASCII(switches::kMojoPrimordialPipeToken,
- shell_pipe_token_);
- }
-
#if defined(OS_WIN) && !defined(OFFICIAL_BUILD)
// Needed because we can't show the dialog from the sandbox. Don't pass
// --no-sandbox in official builds because that would bypass the bad_flgs
@@ -2582,6 +2577,19 @@
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)));
+ }
+
+ // Send the mojo shell handle to the renderer.
+ SendExternalMojoShellHandleToChild(GetHandle(), this);
+
// 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