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

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: tsepez review comments 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
« no previous file with comments | « mojo/public/c/system/message_pipe.h ('k') | mojo/runner/host/child_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/runner/host/child_process.cc
diff --git a/mojo/runner/host/child_process.cc b/mojo/runner/host/child_process.cc
index 0dd6d84c316a7e6d79540384ba497614ad9157a7..a9f07bb7325962ca892211b4eef03ea942d08ebd 100644
--- a/mojo/runner/host/child_process.cc
+++ b/mojo/runner/host/child_process.cc
@@ -124,7 +124,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 =
@@ -305,7 +307,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
@@ -339,9 +340,6 @@ ScopedMessagePipeHandle InitializeHostMessagePipe(
#endif
)));
}
-#else
- // TODO(jam): hook up on POSIX
-#endif
return host_message_pipe.Pass();
}
@@ -385,6 +383,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,
« no previous file with comments | « mojo/public/c/system/message_pipe.h ('k') | mojo/runner/host/child_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698