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

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

Issue 1387963004: Create a broker interface for the new Mojo EDK so that the browser can create and duplicate messa... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: presubmit whitespace error Created 5 years, 1 month 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
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.

Powered by Google App Engine
This is Rietveld 408576698