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

Unified Diff: mojo/edk/system/ports/node.h

Issue 1675603002: [mojo-edk] Simplify multiprocess pipe bootstrap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix some callers to work with sync APIs Created 4 years, 10 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/edk/system/ports/name.h ('k') | mojo/edk/system/ports/node.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/ports/node.h
diff --git a/mojo/edk/system/ports/node.h b/mojo/edk/system/ports/node.h
index 410d53b7ec1e76117cb23a3a682fc8294bf758df..cb1d5fd2b1dadf4e1e39e95b062277d8378ef5d1 100644
--- a/mojo/edk/system/ports/node.h
+++ b/mojo/edk/system/ports/node.h
@@ -122,6 +122,21 @@ class Node {
// Corresponding to NodeDelegate::ForwardMessage.
int AcceptMessage(ScopedMessage message);
+ // Called to merge two ports with each other. If you have two independent
+ // port pairs A <=> B and C <=> D, the net result of merging B and C is a
+ // single connected port pair A <=> D.
+ //
+ // Note that the behavior of this operation is undefined if either port to be
+ // merged (B or C above) has ever been read from or written to directly, and
+ // this must ONLY be called on one side of the merge, though it doesn't matter
+ // which side.
+ //
+ // It is safe for the non-merged peers (A and D above) to be transferred,
+ // closed, and/or written to before, during, or after the merge.
+ int MergePorts(const PortRef& port_ref,
+ const NodeName& destination_node_name,
+ const PortName& destination_port_name);
+
// Called to inform this node that communication with another node is lost
// indefinitely. This triggers cleanup of ports bound to this node.
int LostConnectionToNode(const NodeName& node_name);
@@ -133,6 +148,7 @@ class Node {
const ObserveProxyEventData& event);
int OnObserveProxyAck(const PortName& port_name, uint64_t last_sequence_num);
int OnObserveClosure(const PortName& port_name, uint64_t last_sequence_num);
+ int OnMergePort(const PortName& port_name, const MergePortEventData& event);
int AddPortWithName(const PortName& port_name,
const scoped_refptr<Port>& port);
@@ -151,6 +167,7 @@ class Node {
int WillSendMessage_Locked(Port* port,
const PortName& port_name,
Message* message);
+ int BeginProxying_Locked(Port* port, const PortName& port_name);
int ForwardMessages_Locked(Port* port, const PortName& port_name);
void InitiateProxyRemoval_Locked(Port* port, const PortName& port_name);
void MaybeRemoveProxy_Locked(Port* port, const PortName& port_name);
« no previous file with comments | « mojo/edk/system/ports/name.h ('k') | mojo/edk/system/ports/node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698