| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IPC_IPC_SYNC_CHANNEL_H_ | 5 #ifndef IPC_IPC_SYNC_CHANNEL_H_ |
| 6 #define IPC_IPC_SYNC_CHANNEL_H_ | 6 #define IPC_IPC_SYNC_CHANNEL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 // returned. Otherwise the function returns false. | 136 // returned. Otherwise the function returns false. |
| 137 bool TryToUnblockListener(const Message* msg); | 137 bool TryToUnblockListener(const Message* msg); |
| 138 | 138 |
| 139 // Called on the IPC thread when a sync send that runs a nested message loop | 139 // Called on the IPC thread when a sync send that runs a nested message loop |
| 140 // times out. | 140 // times out. |
| 141 void OnSendTimeout(int message_id); | 141 void OnSendTimeout(int message_id); |
| 142 | 142 |
| 143 base::WaitableEvent* shutdown_event() { return shutdown_event_; } | 143 base::WaitableEvent* shutdown_event() { return shutdown_event_; } |
| 144 | 144 |
| 145 ReceivedSyncMsgQueue* received_sync_msgs() { | 145 ReceivedSyncMsgQueue* received_sync_msgs() { |
| 146 return received_sync_msgs_; | 146 return received_sync_msgs_.get(); |
| 147 } | 147 } |
| 148 | 148 |
| 149 void set_restrict_dispatch(bool value) { restrict_dispatch_ = value; } | 149 void set_restrict_dispatch(bool value) { restrict_dispatch_ = value; } |
| 150 bool restrict_dispatch() const { return restrict_dispatch_; } | 150 bool restrict_dispatch() const { return restrict_dispatch_; } |
| 151 | 151 |
| 152 private: | 152 private: |
| 153 virtual ~SyncContext(); | 153 virtual ~SyncContext(); |
| 154 // ChannelProxy methods that we override. | 154 // ChannelProxy methods that we override. |
| 155 | 155 |
| 156 // Called on the listener thread. | 156 // Called on the listener thread. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 203 |
| 204 // Used to signal events between the IPC and listener threads. | 204 // Used to signal events between the IPC and listener threads. |
| 205 base::WaitableEventWatcher dispatch_watcher_; | 205 base::WaitableEventWatcher dispatch_watcher_; |
| 206 | 206 |
| 207 DISALLOW_COPY_AND_ASSIGN(SyncChannel); | 207 DISALLOW_COPY_AND_ASSIGN(SyncChannel); |
| 208 }; | 208 }; |
| 209 | 209 |
| 210 } // namespace IPC | 210 } // namespace IPC |
| 211 | 211 |
| 212 #endif // IPC_IPC_SYNC_CHANNEL_H_ | 212 #endif // IPC_IPC_SYNC_CHANNEL_H_ |
| OLD | NEW |