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

Unified Diff: mojo/system/message_pipe.h

Issue 505863002: Mojo: Add static factory functions to MessagePipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 4 months 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/system/core.cc ('k') | mojo/system/message_pipe.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/message_pipe.h
diff --git a/mojo/system/message_pipe.h b/mojo/system/message_pipe.h
index f39c7b04b334272a074c8dda857e68e67085c828..da171e2724c727a6deb3fef19cd0c440c4dfb627 100644
--- a/mojo/system/message_pipe.h
+++ b/mojo/system/message_pipe.h
@@ -37,9 +37,19 @@ class MOJO_SYSTEM_IMPL_EXPORT MessagePipe
MessagePipe(scoped_ptr<MessagePipeEndpoint> endpoint0,
scoped_ptr<MessagePipeEndpoint> endpoint1);
- // Convenience constructor that constructs a |MessagePipe| with two new
- // |LocalMessagePipeEndpoint|s.
- MessagePipe();
+ // Creates a |MessagePipe| with two new |LocalMessagePipeEndpoint|s.
+ static MessagePipe* CreateLocalLocal();
+
+ // Creates a |MessagePipe| with a |LocalMessagePipeEndpoint| on port 0 and a
+ // |ProxyMessagePipeEndpoint| on port 1.
+ static MessagePipe* CreateLocalProxy();
+
+ // Creates a |MessagePipe| with a |ProxyMessagePipeEndpoint| on port 0 and a
+ // |LocalMessagePipeEndpoint| on port 1.
+ // Note: This is really only needed in tests (outside of tests, this
+ // configuration arises from a local message pipe having its port 0
+ // "converted" using |ConvertLocalToProxy()|).
+ static MessagePipe* CreateProxyLocal();
// Gets the other port number (i.e., 0 -> 1, 1 -> 0).
static unsigned GetPeerPort(unsigned port);
« no previous file with comments | « mojo/system/core.cc ('k') | mojo/system/message_pipe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698