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

Unified Diff: ipc/ipc_sync_channel.h

Issue 12087120: Revert 179987 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 | « content/browser/plugin_service_impl.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
===================================================================
--- ipc/ipc_sync_channel.h (revision 179992)
+++ ipc/ipc_sync_channel.h (working copy)
@@ -58,7 +58,8 @@
// is more than this object. If the message loop goes away while this object
// is running and it's used to send a message, then it will use the invalid
// message loop pointer to proxy it to the ipc thread.
-class IPC_EXPORT SyncChannel : public ChannelProxy {
+class IPC_EXPORT SyncChannel : public ChannelProxy,
+ public base::WaitableEventWatcher::Delegate {
public:
enum RestrictDispatchGroup {
kRestrictDispatchGroup_None = 0,
@@ -114,7 +115,8 @@
// SyncContext holds the per object data for SyncChannel, so that SyncChannel
// can be deleted while it's being used in a different thread. See
// ChannelProxy::Context for more information.
- class SyncContext : public Context {
+ class SyncContext : public Context,
+ public base::WaitableEventWatcher::Delegate {
public:
SyncContext(Listener* listener,
base::SingleThreadTaskRunner* ipc_task_runner,
@@ -148,10 +150,6 @@
void OnSendTimeout(int message_id);
base::WaitableEvent* shutdown_event() { return shutdown_event_; }
- base::WaitableEventWatcher::EventCallback
- shutdown_watcher_callback() const {
- return shutdown_watcher_callback_;
- }
ReceivedSyncMsgQueue* received_sync_msgs() {
return received_sync_msgs_;
@@ -181,7 +179,8 @@
// Cancels all pending Send calls.
void CancelPendingSends();
- void OnWaitableEventSignaled(base::WaitableEvent* arg);
+ // WaitableEventWatcher::Delegate implementation.
+ virtual void OnWaitableEventSignaled(base::WaitableEvent* arg) OVERRIDE;
typedef std::deque<PendingSyncMsg> PendingSyncMessageQueue;
PendingSyncMessageQueue deserializers_;
@@ -191,12 +190,12 @@
base::WaitableEvent* shutdown_event_;
base::WaitableEventWatcher shutdown_watcher_;
- base::WaitableEventWatcher::EventCallback shutdown_watcher_callback_;
int restrict_dispatch_group_;
};
private:
- void OnWaitableEventSignaled(base::WaitableEvent* arg);
+ // WaitableEventWatcher::Delegate implementation.
+ virtual void OnWaitableEventSignaled(base::WaitableEvent* arg) OVERRIDE;
SyncContext* sync_context() {
return reinterpret_cast<SyncContext*>(context());
@@ -218,7 +217,6 @@
// Used to signal events between the IPC and listener threads.
base::WaitableEventWatcher dispatch_watcher_;
- base::Callback<void(base::WaitableEvent*)> dispatch_watcher_callback_;
DISALLOW_COPY_AND_ASSIGN(SyncChannel);
};
« no previous file with comments | « content/browser/plugin_service_impl.cc ('k') | ipc/ipc_sync_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698