| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 162 |
| 163 // Sets a new MessageFilter. MessagePumpForUI takes ownership of | 163 // Sets a new MessageFilter. MessagePumpForUI takes ownership of |
| 164 // |message_filter|. When SetMessageFilter is called, old MessageFilter is | 164 // |message_filter|. When SetMessageFilter is called, old MessageFilter is |
| 165 // deleted. | 165 // deleted. |
| 166 void SetMessageFilter(scoped_ptr<MessageFilter> message_filter); | 166 void SetMessageFilter(scoped_ptr<MessageFilter> message_filter); |
| 167 | 167 |
| 168 // MessagePump methods: | 168 // MessagePump methods: |
| 169 virtual void ScheduleWork(); | 169 virtual void ScheduleWork(); |
| 170 virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time); | 170 virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time); |
| 171 | 171 |
| 172 // Applications can call this to encourage us to process all pending WM_PAINT | |
| 173 // messages. This method will process all paint messages the Windows Message | |
| 174 // queue can provide, up to some fixed number (to avoid any infinite loops). | |
| 175 void PumpOutPendingPaintMessages(); | |
| 176 | |
| 177 private: | 172 private: |
| 178 static LRESULT CALLBACK WndProcThunk(HWND window_handle, | 173 static LRESULT CALLBACK WndProcThunk(HWND window_handle, |
| 179 UINT message, | 174 UINT message, |
| 180 WPARAM wparam, | 175 WPARAM wparam, |
| 181 LPARAM lparam); | 176 LPARAM lparam); |
| 182 virtual void DoRunLoop(); | 177 virtual void DoRunLoop(); |
| 183 void InitMessageWnd(); | 178 void InitMessageWnd(); |
| 184 void WaitForWork(); | 179 void WaitForWork(); |
| 185 void HandleWorkMessage(); | 180 void HandleWorkMessage(); |
| 186 void HandleTimerMessage(); | 181 void HandleTimerMessage(); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 // This list will be empty almost always. It stores IO completions that have | 382 // This list will be empty almost always. It stores IO completions that have |
| 388 // not been delivered yet because somebody was doing cleanup. | 383 // not been delivered yet because somebody was doing cleanup. |
| 389 std::list<IOItem> completed_io_; | 384 std::list<IOItem> completed_io_; |
| 390 | 385 |
| 391 ObserverList<IOObserver> io_observers_; | 386 ObserverList<IOObserver> io_observers_; |
| 392 }; | 387 }; |
| 393 | 388 |
| 394 } // namespace base | 389 } // namespace base |
| 395 | 390 |
| 396 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_WIN_H_ | 391 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_WIN_H_ |
| OLD | NEW |