| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 ~MessagePumpForGpu() override; | 157 ~MessagePumpForGpu() override; |
| 158 | 158 |
| 159 // Factory methods. | 159 // Factory methods. |
| 160 static void InitFactory(); | 160 static void InitFactory(); |
| 161 static std::unique_ptr<MessagePump> CreateMessagePumpForGpu(); | 161 static std::unique_ptr<MessagePump> CreateMessagePumpForGpu(); |
| 162 | 162 |
| 163 // MessagePump methods: | 163 // MessagePump methods: |
| 164 void ScheduleWork() override; | 164 void ScheduleWork() override; |
| 165 void ScheduleDelayedWork(const TimeTicks& delayed_work_time) override; | 165 void ScheduleDelayedWork(const TimeTicks& delayed_work_time) override; |
| 166 | 166 |
| 167 // TODO (stanisc): crbug.com/596190: Remove this after the signaling issue |
| 168 // has been investigated. |
| 169 // This should be used for diagnostic only. If message pump wake-up mechanism |
| 170 // is based on auto-reset event this call would reset the event to unset |
| 171 // state. |
| 172 bool WasSignaled() override; |
| 173 |
| 167 private: | 174 private: |
| 168 // MessagePumpWin methods: | 175 // MessagePumpWin methods: |
| 169 void DoRunLoop() override; | 176 void DoRunLoop() override; |
| 170 | 177 |
| 171 void WaitForWork(); | 178 void WaitForWork(); |
| 172 bool ProcessNextMessage(); | 179 bool ProcessNextMessage(); |
| 173 | 180 |
| 174 const HANDLE event_; | 181 const HANDLE event_; |
| 175 | 182 |
| 176 // Used to help diagnose hangs. | 183 // Used to help diagnose hangs. |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 // The completion port associated with this thread. | 291 // The completion port associated with this thread. |
| 285 win::ScopedHandle port_; | 292 win::ScopedHandle port_; |
| 286 // 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 |
| 287 // not been delivered yet because somebody was doing cleanup. | 294 // not been delivered yet because somebody was doing cleanup. |
| 288 std::list<IOItem> completed_io_; | 295 std::list<IOItem> completed_io_; |
| 289 }; | 296 }; |
| 290 | 297 |
| 291 } // namespace base | 298 } // namespace base |
| 292 | 299 |
| 293 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_WIN_H_ | 300 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_WIN_H_ |
| OLD | NEW |