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 #include "base/message_pump_win.h" | 5 #include "base/message_pump_win.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include "base/histogram.h" | 9 #include "base/histogram.h" |
10 #include "base/win_util.h" | 10 #include "base/win_util.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 break; | 151 break; |
152 } else { | 152 } else { |
153 if (!PeekMessage(&msg, NULL, 0, 0, PM_REMOVE | PM_QS_PAINT)) | 153 if (!PeekMessage(&msg, NULL, 0, 0, PM_REMOVE | PM_QS_PAINT)) |
154 break; | 154 break; |
155 } | 155 } |
156 ProcessMessageHelper(msg); | 156 ProcessMessageHelper(msg); |
157 if (state_->should_quit) // Handle WM_QUIT. | 157 if (state_->should_quit) // Handle WM_QUIT. |
158 break; | 158 break; |
159 } | 159 } |
160 // Histogram what was really being used, to help to adjust kMaxPeekCount. | 160 // Histogram what was really being used, to help to adjust kMaxPeekCount. |
161 DHISTOGRAM_COUNTS(L"Loop.PumpOutPendingPaintMessages Peeks", peek_count); | 161 DHISTOGRAM_COUNTS("Loop.PumpOutPendingPaintMessages Peeks", peek_count); |
162 } | 162 } |
163 | 163 |
164 //----------------------------------------------------------------------------- | 164 //----------------------------------------------------------------------------- |
165 // MessagePumpForUI private: | 165 // MessagePumpForUI private: |
166 | 166 |
167 // static | 167 // static |
168 LRESULT CALLBACK MessagePumpForUI::WndProcThunk( | 168 LRESULT CALLBACK MessagePumpForUI::WndProcThunk( |
169 HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { | 169 HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { |
170 switch (message) { | 170 switch (message) { |
171 case kMsgHaveWork: | 171 case kMsgHaveWork: |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 if (!filter || it->handler == filter) { | 547 if (!filter || it->handler == filter) { |
548 *item = *it; | 548 *item = *it; |
549 completed_io_.erase(it); | 549 completed_io_.erase(it); |
550 return true; | 550 return true; |
551 } | 551 } |
552 } | 552 } |
553 return false; | 553 return false; |
554 } | 554 } |
555 | 555 |
556 } // namespace base | 556 } // namespace base |
OLD | NEW |