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

Unified Diff: content/browser/browser_child_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/browser_child_process_host_impl.cc
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc
index b871aa9222976472fa6f25f982f7022d8ef843dc..148054c3ba6a5a10f6015fc912074718c8a42ae3 100644
--- a/content/browser/browser_child_process_host_impl.cc
+++ b/content/browser/browser_child_process_host_impl.cc
@@ -21,6 +21,7 @@
#include "content/browser/profiler_message_filter.h"
#include "content/browser/tracing/trace_message_filter.h"
#include "content/common/child_process_host_impl.h"
+#include "content/common/child_process_messages.h"
#include "content/public/browser/browser_child_process_host_delegate.h"
#include "content/public/browser/browser_child_process_observer.h"
#include "content/public/browser/browser_thread.h"
@@ -31,6 +32,7 @@
#include "content/public/common/result_codes.h"
#include "ipc/attachment_broker.h"
#include "ipc/attachment_broker_privileged.h"
+#include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
#if defined(OS_MACOSX)
#include "content/browser/mach_broker_mac.h"
@@ -400,6 +402,12 @@ void BrowserChildProcessHostImpl::OnProcessLaunched() {
DCHECK(process.IsValid());
#if defined(OS_WIN)
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("use-new-edk")) {
+ HANDLE client_pipe = mojo::embedder::ChildProcessLaunched(process.Handle());
+ Send(new ChildProcessMsg_SetMojoParentPipeHandle(
+ IPC::GetFileHandleForProcess(client_pipe, process.Handle(), true)));
+ }
+
// Start a WaitableEventWatcher that will invoke OnProcessExitedEarly if the
// child process exits. This watcher is stopped once the IPC channel is
// connected and the exit of the child process is detecter by an error on the

Powered by Google App Engine
This is Rietveld 408576698