Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: base/message_loop/message_pump_win.h

Issue 1189133003: Ensure that the wake up timer set by the UI worker thread in the UI message pump on Windows is set … Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // A hidden message-only window. 164 // A hidden message-only window.
165 HWND message_hwnd_; 165 HWND message_hwnd_;
166 166
167 // This thread is used to periodically wake up the main thread to process 167 // This thread is used to periodically wake up the main thread to process
168 // tasks. 168 // tasks.
169 scoped_ptr<base::Thread> ui_worker_thread_; 169 scoped_ptr<base::Thread> ui_worker_thread_;
170 170
171 // The UI worker thread waits on this timer indefinitely. When the main 171 // The UI worker thread waits on this timer indefinitely. When the main
172 // thread has tasks ready to be processed it sets the timer. 172 // thread has tasks ready to be processed it sets the timer.
173 base::win::ScopedHandle ui_worker_thread_timer_; 173 base::win::ScopedHandle ui_worker_thread_timer_;
174
175 // This flag controls whether the UI worker thread sets the waitable timer
176 // to ensure that tasks missed in one timer iteration get picked in the
177 // second.
178 long force_fallback_timer_for_tasks_;
brucedawson 2015/06/19 21:09:01 I believe we are now allowed to use in-place initi
ananta 2015/06/19 22:19:10 Leaving this as is for consistency for now.
174 }; 179 };
175 180
176 //----------------------------------------------------------------------------- 181 //-----------------------------------------------------------------------------
177 // MessagePumpForIO extends MessagePumpWin with methods that are particular to a 182 // MessagePumpForIO extends MessagePumpWin with methods that are particular to a
178 // MessageLoop instantiated with TYPE_IO. This version of MessagePump does not 183 // MessageLoop instantiated with TYPE_IO. This version of MessagePump does not
179 // deal with Windows mesagges, and instead has a Run loop based on Completion 184 // deal with Windows mesagges, and instead has a Run loop based on Completion
180 // Ports so it is better suited for IO operations. 185 // Ports so it is better suited for IO operations.
181 // 186 //
182 class BASE_EXPORT MessagePumpForIO : public MessagePumpWin { 187 class BASE_EXPORT MessagePumpForIO : public MessagePumpWin {
183 public: 188 public:
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 // This list will be empty almost always. It stores IO completions that have 368 // This list will be empty almost always. It stores IO completions that have
364 // not been delivered yet because somebody was doing cleanup. 369 // not been delivered yet because somebody was doing cleanup.
365 std::list<IOItem> completed_io_; 370 std::list<IOItem> completed_io_;
366 371
367 ObserverList<IOObserver> io_observers_; 372 ObserverList<IOObserver> io_observers_;
368 }; 373 };
369 374
370 } // namespace base 375 } // namespace base
371 376
372 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_WIN_H_ 377 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | base/message_loop/message_pump_win.cc » ('j') | base/message_loop/message_pump_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698