| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_PUMP_WIN_H_ | 5 #ifndef BASE_MESSAGE_PUMP_WIN_H_ |
| 6 #define BASE_MESSAGE_PUMP_WIN_H_ | 6 #define BASE_MESSAGE_PUMP_WIN_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 // is peeked, and before a replacement kMsgHaveWork is posted). | 150 // is peeked, and before a replacement kMsgHaveWork is posted). |
| 151 // | 151 // |
| 152 // NOTE: Although it may seem odd that messages are used to start and stop this | 152 // NOTE: Although it may seem odd that messages are used to start and stop this |
| 153 // flow (as opposed to signaling objects, etc.), it should be understood that | 153 // flow (as opposed to signaling objects, etc.), it should be understood that |
| 154 // the native message pump will *only* respond to messages. As a result, it is | 154 // the native message pump will *only* respond to messages. As a result, it is |
| 155 // an excellent choice. It is also helpful that the starter messages that are | 155 // an excellent choice. It is also helpful that the starter messages that are |
| 156 // placed in the queue when new task arrive also awakens DoRunLoop. | 156 // placed in the queue when new task arrive also awakens DoRunLoop. |
| 157 // | 157 // |
| 158 class MessagePumpForUI : public MessagePumpWin { | 158 class MessagePumpForUI : public MessagePumpWin { |
| 159 public: | 159 public: |
| 160 // The application-defined code passed to the hook procedure. |
| 161 static const int kMessageFilterCode = 0x5001; |
| 162 |
| 160 MessagePumpForUI(); | 163 MessagePumpForUI(); |
| 161 virtual ~MessagePumpForUI(); | 164 virtual ~MessagePumpForUI(); |
| 162 | 165 |
| 163 // MessagePump methods: | 166 // MessagePump methods: |
| 164 virtual void ScheduleWork(); | 167 virtual void ScheduleWork(); |
| 165 virtual void ScheduleDelayedWork(const Time& delayed_work_time); | 168 virtual void ScheduleDelayedWork(const Time& delayed_work_time); |
| 166 | 169 |
| 167 // Applications can call this to encourage us to process all pending WM_PAINT | 170 // Applications can call this to encourage us to process all pending WM_PAINT |
| 168 // messages. This method will process all paint messages the Windows Message | 171 // messages. This method will process all paint messages the Windows Message |
| 169 // queue can provide, up to some fixed number (to avoid any infinite loops). | 172 // queue can provide, up to some fixed number (to avoid any infinite loops). |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 // The completion port associated with this thread. | 337 // The completion port associated with this thread. |
| 335 ScopedHandle port_; | 338 ScopedHandle port_; |
| 336 // This list will be empty almost always. It stores IO completions that have | 339 // This list will be empty almost always. It stores IO completions that have |
| 337 // not been delivered yet because somebody was doing cleanup. | 340 // not been delivered yet because somebody was doing cleanup. |
| 338 std::list<IOItem> completed_io_; | 341 std::list<IOItem> completed_io_; |
| 339 }; | 342 }; |
| 340 | 343 |
| 341 } // namespace base | 344 } // namespace base |
| 342 | 345 |
| 343 #endif // BASE_MESSAGE_PUMP_WIN_H_ | 346 #endif // BASE_MESSAGE_PUMP_WIN_H_ |
| OLD | NEW |