OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 // GetMessage() loop. | 344 // GetMessage() loop. |
345 state_->should_quit = true; | 345 state_->should_quit = true; |
346 PostQuitMessage(static_cast<int>(msg.wParam)); | 346 PostQuitMessage(static_cast<int>(msg.wParam)); |
347 return false; | 347 return false; |
348 } | 348 } |
349 | 349 |
350 // While running our main message pump, we discard kMsgHaveWork messages. | 350 // While running our main message pump, we discard kMsgHaveWork messages. |
351 if (msg.message == kMsgHaveWork && msg.hwnd == message_hwnd_) | 351 if (msg.message == kMsgHaveWork && msg.hwnd == message_hwnd_) |
352 return ProcessPumpReplacementMessage(); | 352 return ProcessPumpReplacementMessage(); |
353 | 353 |
| 354 if (CallMsgFilter(const_cast<MSG*>(&msg), kMessageFilterCode)) |
| 355 return true; |
| 356 |
354 WillProcessMessage(msg); | 357 WillProcessMessage(msg); |
355 | 358 |
356 if (state_->dispatcher) { | 359 if (state_->dispatcher) { |
357 if (!state_->dispatcher->Dispatch(msg)) | 360 if (!state_->dispatcher->Dispatch(msg)) |
358 state_->should_quit = true; | 361 state_->should_quit = true; |
359 } else { | 362 } else { |
360 TranslateMessage(&msg); | 363 TranslateMessage(&msg); |
361 DispatchMessage(&msg); | 364 DispatchMessage(&msg); |
362 } | 365 } |
363 | 366 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 if (!filter || it->handler == filter) { | 551 if (!filter || it->handler == filter) { |
549 *item = *it; | 552 *item = *it; |
550 completed_io_.erase(it); | 553 completed_io_.erase(it); |
551 return true; | 554 return true; |
552 } | 555 } |
553 } | 556 } |
554 return false; | 557 return false; |
555 } | 558 } |
556 | 559 |
557 } // namespace base | 560 } // namespace base |
OLD | NEW |