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

Unified Diff: mojo/edk/embedder/embedder.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 | « content/renderer/render_thread_impl_browsertest.cc ('k') | mojo/edk/embedder/embedder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/embedder.cc
diff --git a/mojo/edk/embedder/embedder.cc b/mojo/edk/embedder/embedder.cc
index eb572c5717bebeb537fdc44481e1a9992ac2b55c..35e55baae53a9d89254c70e8027177e0b2ba708b 100644
--- a/mojo/edk/embedder/embedder.cc
+++ b/mojo/edk/embedder/embedder.cc
@@ -65,15 +65,9 @@ void PreInitializeChildProcess() {
}
ScopedPlatformHandle ChildProcessLaunched(base::ProcessHandle child_process) {
-#if defined(OS_WIN)
PlatformChannelPair token_channel;
new ChildBrokerHost(child_process, token_channel.PassServerHandle());
return token_channel.PassClientHandle();
-#else
- // TODO(jam): create this for POSIX. Need to implement channel reading first
- // so we don't leak handles.
- return ScopedPlatformHandle();
-#endif
}
void ChildProcessLaunched(base::ProcessHandle child_process,
@@ -165,9 +159,11 @@ void ShutdownIPCSupport() {
ScopedMessagePipeHandle CreateMessagePipe(
ScopedPlatformHandle platform_handle) {
+ MojoCreateMessagePipeOptions options = {
+ static_cast<uint32_t>(sizeof(MojoCreateMessagePipeOptions)),
+ MOJO_CREATE_MESSAGE_PIPE_OPTIONS_FLAG_TRANSFERABLE};
scoped_refptr<MessagePipeDispatcher> dispatcher =
- MessagePipeDispatcher::Create(
- MessagePipeDispatcher::kDefaultCreateOptions);
+ MessagePipeDispatcher::Create(options);
ScopedMessagePipeHandle rv(
MessagePipeHandle(internal::g_core->AddDispatcher(dispatcher)));
« no previous file with comments | « content/renderer/render_thread_impl_browsertest.cc ('k') | mojo/edk/embedder/embedder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698