| 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 BASE_MESSAGE_LOOP_MESSAGE_PUMP_WIN_H_ | 5 #ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_WIN_H_ |
| 6 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_WIN_H_ | 6 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_WIN_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 // state. | 171 // state. |
| 172 bool WasSignaled() override; | 172 bool WasSignaled() override; |
| 173 | 173 |
| 174 private: | 174 private: |
| 175 // MessagePumpWin methods: | 175 // MessagePumpWin methods: |
| 176 void DoRunLoop() override; | 176 void DoRunLoop() override; |
| 177 | 177 |
| 178 void WaitForWork(); | 178 void WaitForWork(); |
| 179 bool ProcessNextMessage(); | 179 bool ProcessNextMessage(); |
| 180 | 180 |
| 181 const HANDLE event_; | 181 win::ScopedHandle event_; |
| 182 | 182 |
| 183 // Used to help diagnose hangs. | 183 // Used to help diagnose hangs. |
| 184 // TODO(stanisc): crbug.com/596190: Remove these once the bug is fixed. | 184 // TODO(stanisc): crbug.com/596190: Remove these once the bug is fixed. |
| 185 TimeTicks last_set_event_timeticks_; | 185 TimeTicks last_set_event_timeticks_; |
| 186 }; | 186 }; |
| 187 | 187 |
| 188 //----------------------------------------------------------------------------- | 188 //----------------------------------------------------------------------------- |
| 189 // MessagePumpForIO extends MessagePumpWin with methods that are particular to a | 189 // MessagePumpForIO extends MessagePumpWin with methods that are particular to a |
| 190 // MessageLoop instantiated with TYPE_IO. This version of MessagePump does not | 190 // MessageLoop instantiated with TYPE_IO. This version of MessagePump does not |
| 191 // deal with Windows mesagges, and instead has a Run loop based on Completion | 191 // deal with Windows mesagges, and instead has a Run loop based on Completion |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 // The completion port associated with this thread. | 291 // The completion port associated with this thread. |
| 292 win::ScopedHandle port_; | 292 win::ScopedHandle port_; |
| 293 // This list will be empty almost always. It stores IO completions that have | 293 // This list will be empty almost always. It stores IO completions that have |
| 294 // not been delivered yet because somebody was doing cleanup. | 294 // not been delivered yet because somebody was doing cleanup. |
| 295 std::list<IOItem> completed_io_; | 295 std::list<IOItem> completed_io_; |
| 296 }; | 296 }; |
| 297 | 297 |
| 298 } // namespace base | 298 } // namespace base |
| 299 | 299 |
| 300 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_WIN_H_ | 300 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_WIN_H_ |
| OLD | NEW |