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

Unified Diff: base/message_loop/message_pump_win.cc

Issue 141773009: Revert r151669 and r155589 as non-Aura Metro mode is gone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comment from Nico Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/message_loop/message_pump_win.h ('k') | base/win/metro.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_pump_win.cc
diff --git a/base/message_loop/message_pump_win.cc b/base/message_loop/message_pump_win.cc
index cd16054126766ea6329e66c46134583c57ce579d..ae022bf0957f48be47ad16c77b0f0d99693add21 100644
--- a/base/message_loop/message_pump_win.cc
+++ b/base/message_loop/message_pump_win.cc
@@ -97,8 +97,7 @@ int MessagePumpWin::GetCurrentDelay() const {
// MessagePumpForUI public:
MessagePumpForUI::MessagePumpForUI()
- : atom_(0),
- message_filter_(new MessageFilter) {
+ : atom_(0) {
InitMessageWnd();
}
@@ -346,7 +345,7 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() {
sent_messages_in_queue = true;
MSG msg;
- if (message_filter_->DoPeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
+ if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) != FALSE)
return ProcessMessageHelper(msg);
return sent_messages_in_queue;
@@ -372,16 +371,14 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) {
WillProcessMessage(msg);
- if (!message_filter_->ProcessMessage(msg)) {
- uint32_t action = MessagePumpDispatcher::POST_DISPATCH_PERFORM_DEFAULT;
- if (state_->dispatcher)
- action = state_->dispatcher->Dispatch(msg);
- if (action & MessagePumpDispatcher::POST_DISPATCH_QUIT_LOOP)
- state_->should_quit = true;
- if (action & MessagePumpDispatcher::POST_DISPATCH_PERFORM_DEFAULT) {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
+ uint32_t action = MessagePumpDispatcher::POST_DISPATCH_PERFORM_DEFAULT;
+ if (state_->dispatcher)
+ action = state_->dispatcher->Dispatch(msg);
+ if (action & MessagePumpDispatcher::POST_DISPATCH_QUIT_LOOP)
+ state_->should_quit = true;
+ if (action & MessagePumpDispatcher::POST_DISPATCH_PERFORM_DEFAULT) {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
}
DidProcessMessage(msg);
@@ -408,8 +405,7 @@ bool MessagePumpForUI::ProcessPumpReplacementMessage() {
have_message = PeekMessage(&msg, NULL, WM_PAINT, WM_PAINT, PM_REMOVE) ||
PeekMessage(&msg, NULL, WM_TIMER, WM_TIMER, PM_REMOVE);
} else {
- have_message = !!message_filter_->DoPeekMessage(&msg, NULL, 0, 0,
- PM_REMOVE);
+ have_message = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) != FALSE;
}
DCHECK(!have_message || kMsgHaveWork != msg.message ||
@@ -431,11 +427,6 @@ bool MessagePumpForUI::ProcessPumpReplacementMessage() {
return ProcessMessageHelper(msg);
}
-void MessagePumpForUI::SetMessageFilter(
- scoped_ptr<MessageFilter> message_filter) {
- message_filter_ = message_filter.Pass();
-}
-
//-----------------------------------------------------------------------------
// MessagePumpForIO public:
« no previous file with comments | « base/message_loop/message_pump_win.h ('k') | base/win/metro.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698