| 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);
|
| };
|
|
|