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 5668d50d7815e9d336ab43ef5c45b8d564db025b..1ceb5dc1a5cfed6b6bfef2795f20f5613de0a397 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.cc |
+++ b/content/browser/renderer_host/render_process_host_impl.cc |
@@ -166,6 +166,7 @@ |
#include "storage/browser/fileapi/sandbox_file_system_backend.h" |
#include "third_party/icu/source/common/unicode/unistr.h" |
#include "third_party/icu/source/i18n/unicode/timezone.h" |
+#include "third_party/mojo/src/mojo/edk/embedder/embedder.h" |
#include "third_party/skia/include/core/SkBitmap.h" |
#include "ui/base/ui_base_switches.h" |
#include "ui/events/event_switches.h" |
@@ -2443,6 +2444,16 @@ void RenderProcessHostImpl::OnProcessLaunched() { |
RegisterChildWithExternalShell(id_, GetHandle(), this); |
#endif |
+#if defined(OS_WIN) |
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("use-new-edk") && |
+ child_process_launcher_.get()) { |
+ HANDLE process_handle = child_process_launcher_->GetProcess().Handle(); |
+ HANDLE client_pipe = mojo::embedder::ChildProcessLaunched(process_handle); |
+ Send(new ChildProcessMsg_SetMojoParentPipeHandle( |
+ IPC::GetFileHandleForProcess(client_pipe, process_handle, true))); |
+ } |
+#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. |