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

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: small cleanup 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 fd9275eeb5f73114d60689e58349916ebf535ca1..34d7d5358ee9da7652c2af6b1b8d660cd620dc20 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -167,6 +167,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"
@@ -2465,6 +2466,17 @@ void RenderProcessHostImpl::OnProcessLaunched() {
tracked_objects::ScopedTracker tracking_profile4(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"465841 RenderProcessHostImpl::OnProcessLaunched::MojoActivate"));
+
+#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