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

Unified Diff: ipc/ipc_sync_channel.h

Issue 8417054: Allow proxy channels to be created without initializing the underlying channel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 1 month 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 | « ipc/ipc_channel_proxy.cc ('k') | ipc/ipc_sync_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_sync_channel.h
diff --git a/ipc/ipc_sync_channel.h b/ipc/ipc_sync_channel.h
index e43933e12127e51ed6a84ca977951980710469d3..ae9a7656364ebe28bb7aec601fe782408ff95cf5 100644
--- a/ipc/ipc_sync_channel.h
+++ b/ipc/ipc_sync_channel.h
@@ -62,12 +62,22 @@ class SyncMessage;
class IPC_EXPORT SyncChannel : public ChannelProxy,
public base::WaitableEventWatcher::Delegate {
public:
+ // Creates and initializes a sync channel. If create_pipe_now is specified,
+ // the channel will be initialized synchronously.
SyncChannel(const IPC::ChannelHandle& channel_handle,
Channel::Mode mode,
Channel::Listener* listener,
base::MessageLoopProxy* ipc_message_loop,
bool create_pipe_now,
base::WaitableEvent* shutdown_event);
+
+ // Creates an uninitialized sync channel. Call ChannelProxy::Init to
+ // initialize the channel. This two-step setup allows message filters to be
+ // added before any messages are sent or received.
+ SyncChannel(Channel::Listener* listener,
+ base::MessageLoopProxy* ipc_message_loop,
+ base::WaitableEvent* shutdown_event);
+
virtual ~SyncChannel();
virtual bool Send(Message* message);
@@ -186,6 +196,9 @@ class IPC_EXPORT SyncChannel : public ChannelProxy,
// shuts down.
static void WaitForReplyWithNestedMessageLoop(SyncContext* context);
+ // Starts the dispatch watcher.
+ void StartWatching();
+
bool sync_messages_with_no_timeout_allowed_;
// Used to signal events between the IPC and listener threads.
« no previous file with comments | « ipc/ipc_channel_proxy.cc ('k') | ipc/ipc_sync_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698