Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 149 // needs to get dispatched (by calling SyncContext::DispatchMessages). | 149 // needs to get dispatched (by calling SyncContext::DispatchMessages). |
| 150 base::WaitableEvent* GetDispatchEvent(); | 150 base::WaitableEvent* GetDispatchEvent(); |
| 151 | 151 |
| 152 void DispatchMessages(); | 152 void DispatchMessages(); |
| 153 | 153 |
| 154 // Checks if the given message is blocking the listener thread because of a | 154 // Checks if the given message is blocking the listener thread because of a |
| 155 // synchronous send. If it is, the thread is unblocked and true is | 155 // synchronous send. If it is, the thread is unblocked and true is |
| 156 // returned. Otherwise the function returns false. | 156 // returned. Otherwise the function returns false. |
| 157 bool TryToUnblockListener(const Message* msg); | 157 bool TryToUnblockListener(const Message* msg); |
| 158 | 158 |
| 159 // Called on the IPC thread when a sync send that runs a nested message loop | |
|
Tom Sepez
2016/03/29 16:14:38
Why did we remove this?
tzik
2016/03/29 18:09:23
Because no one uses this and this function touches
| |
| 160 // times out. | |
| 161 void OnSendTimeout(int message_id); | |
| 162 | |
| 163 base::WaitableEvent* shutdown_event() { return shutdown_event_; } | 159 base::WaitableEvent* shutdown_event() { return shutdown_event_; } |
| 164 | 160 |
| 165 ReceivedSyncMsgQueue* received_sync_msgs() { | 161 ReceivedSyncMsgQueue* received_sync_msgs() { |
| 166 return received_sync_msgs_.get(); | 162 return received_sync_msgs_.get(); |
| 167 } | 163 } |
| 168 | 164 |
| 169 void set_restrict_dispatch_group(int group) { | 165 void set_restrict_dispatch_group(int group) { |
| 170 restrict_dispatch_group_ = group; | 166 restrict_dispatch_group_ = group; |
| 171 } | 167 } |
| 172 | 168 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 239 | 235 |
| 240 // Tracks SyncMessageFilters created before complete channel initialization. | 236 // Tracks SyncMessageFilters created before complete channel initialization. |
| 241 std::vector<scoped_refptr<SyncMessageFilter>> pre_init_sync_message_filters_; | 237 std::vector<scoped_refptr<SyncMessageFilter>> pre_init_sync_message_filters_; |
| 242 | 238 |
| 243 DISALLOW_COPY_AND_ASSIGN(SyncChannel); | 239 DISALLOW_COPY_AND_ASSIGN(SyncChannel); |
| 244 }; | 240 }; |
| 245 | 241 |
| 246 } // namespace IPC | 242 } // namespace IPC |
| 247 | 243 |
| 248 #endif // IPC_IPC_SYNC_CHANNEL_H_ | 244 #endif // IPC_IPC_SYNC_CHANNEL_H_ |
| OLD | NEW |