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

Unified Diff: base/message_loop/message_pump_x11.cc

Issue 223483002: base: Do not allow MessagePumpObservers to consume events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-r262009 Created 6 years, 8 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_x11.h ('k') | chrome/browser/chromeos/device_uma.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_pump_x11.cc
diff --git a/base/message_loop/message_pump_x11.cc b/base/message_loop/message_pump_x11.cc
index 6a4db101474239447ab2130903688b19a088645b..cee54fd6bf279353d440fed2db4396ada6a3db73 100644
--- a/base/message_loop/message_pump_x11.cc
+++ b/base/message_loop/message_pump_x11.cc
@@ -66,16 +66,8 @@ void MessagePumpX11::RemoveObserver(MessagePumpObserver* observer) {
observers_.RemoveObserver(observer);
}
-bool MessagePumpX11::WillProcessXEvent(XEvent* xevent) {
- if (!observers_.might_have_observers())
- return false;
- ObserverListBase<MessagePumpObserver>::Iterator it(observers_);
- MessagePumpObserver* obs;
- while ((obs = it.GetNext()) != NULL) {
- if (obs->WillProcessEvent(xevent))
- return true;
- }
- return false;
+void MessagePumpX11::WillProcessXEvent(XEvent* xevent) {
+ FOR_EACH_OBSERVER(MessagePumpObserver, observers_, WillProcessEvent(xevent));
}
void MessagePumpX11::DidProcessXEvent(XEvent* xevent) {
« no previous file with comments | « base/message_loop/message_pump_x11.h ('k') | chrome/browser/chromeos/device_uma.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698