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

Unified Diff: ipc/ipc_channel.h

Issue 2301123004: Mojo Channel: Fix deferred proxy dispatch; support paused channels (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | ipc/ipc_channel_common.cc » ('j') | ipc/ipc_channel_proxy.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel.h
diff --git a/ipc/ipc_channel.h b/ipc/ipc_channel.h
index a1917d936601803829328b8b0b80d4f8271a0a7b..709236ab2fc61c21052850dabe01b264604aa105 100644
--- a/ipc/ipc_channel.h
+++ b/ipc/ipc_channel.h
@@ -222,6 +222,34 @@ class IPC_EXPORT Channel : public Endpoint {
// implementation.
virtual bool Connect() WARN_UNUSED_RESULT = 0;
+ // Similar to (and exclusive to) Connect() above, but blocks outgoing messages
+ // until a future call to Unpause().
+ //
+ // Not all implementations support ConnectPaused(). Note that this interface
+ // exists only to facilitate weird behavior where some Channel consumers want
+ // force some early messages to be transmitted before ones which were sent
yzshen1 2016/09/02 22:03:36 nit: force -> to force?
Ken Rockot(use gerrit already) 2016/09/06 17:21:27 Done
+ // earlier. This allows that to be done without the consumer implementing
+ // their own message queueing support which may be incompatible with the
+ // Channel's internal queueing behavior.
+ virtual bool ConnectPaused() WARN_UNUSED_RESULT;
+
+ // Unpause the pipe. This allows subsequent Send() calls to transmit messages
+ // immediately, without queueing. If |flush| is true, any messages queued
+ // while paused will be flushed immediately upon unpausing. Otherwise you must
+ // call Flush() explicitly.
+ //
+ // Not all implementations support Unpause(). See ConnectPaused() above for
+ // details.
+ virtual void Unpause(bool flush);
+
+ // Manually flush the pipe. This is only useful exactly once, and only after
+ // a call to Unpause(false), in order to explicitly flush out any
+ // messages which were queued prior to unpausing.
+ //
+ // Not all implementations support Flush(). See ConnectPaused() above for
+ // details.
+ virtual void Flush();
+
// Close this Channel explicitly. May be called multiple times.
// On POSIX calling close on an IPC channel that listens for connections will
// cause it to close any accepted connections, and it will stop listening for
« no previous file with comments | « no previous file | ipc/ipc_channel_common.cc » ('j') | ipc/ipc_channel_proxy.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698