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

Unified Diff: mojo/runner/host/child_process.cc

Issue 1488853002: Add multiplexing of message pipes in the new EDK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chrome and POSIX Created 5 years 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: mojo/runner/host/child_process.cc
diff --git a/mojo/runner/host/child_process.cc b/mojo/runner/host/child_process.cc
index f0bfd21bedaca18aa6a81f9002b3db8e64852769..421d75a1a4770f520343d34b6a827bda7b93838f 100644
--- a/mojo/runner/host/child_process.cc
+++ b/mojo/runner/host/child_process.cc
@@ -123,7 +123,9 @@ class AppContext : public embedder::ProcessDelegate {
// create a message pipe which requires this code to be run first.
embedder::InitIPCSupport(embedder::ProcessType::NONE, this, io_runner_,
embedder::ScopedPlatformHandle());
+ }
+ void StartControllerThread() {
// Create and start our controller thread.
base::Thread::Options controller_thread_options;
controller_thread_options.message_loop_type =
@@ -304,7 +306,6 @@ ScopedMessagePipeHandle InitializeHostMessagePipe(
ScopedMessagePipeHandle host_message_pipe(embedder::CreateChannel(
platform_channel.Pass(), base::Bind(&DidCreateChannel), io_task_runner));
-#if defined(OS_WIN)
if (base::CommandLine::ForCurrentProcess()->HasSwitch("use-new-edk")) {
// When using the new Mojo EDK, each message pipe is backed by a platform
// handle. The one platform handle that comes on the command line is used
@@ -338,9 +339,6 @@ ScopedMessagePipeHandle InitializeHostMessagePipe(
#endif
)));
}
-#else
- // TODO(jam): hook up on POSIX
-#endif
return host_message_pipe.Pass();
}
@@ -379,6 +377,7 @@ int ChildProcessMain() {
app_context.Init();
ScopedMessagePipeHandle host_message_pipe = InitializeHostMessagePipe(
platform_channel.Pass(), app_context.io_runner());
+ app_context.StartControllerThread();
Blocker blocker;
app_context.controller_runner()->PostTask(
FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698