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

Unified Diff: ui/events/platform/x11/x11_event_source_libevent.cc

Issue 2414863002: Remove usage of base::ObserverList<T>::Iter::GetNext() in //ui. (Closed)
Patch Set: debrace Created 4 years, 2 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 | « ui/events/platform/platform_event_source.cc ('k') | ui/views/mus/pointer_watcher_event_router.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/platform/x11/x11_event_source_libevent.cc
diff --git a/ui/events/platform/x11/x11_event_source_libevent.cc b/ui/events/platform/x11/x11_event_source_libevent.cc
index 708ab4104a4d9dc4821b50414e1d6f094950805d..c4beb1e4ea5450aae5248a34ce1482d73bd9f9de 100644
--- a/ui/events/platform/x11/x11_event_source_libevent.cc
+++ b/ui/events/platform/x11/x11_event_source_libevent.cc
@@ -179,12 +179,9 @@ void X11EventSourceLibevent::AddEventWatcher() {
}
void X11EventSourceLibevent::DispatchXEventToXEventDispatchers(XEvent* xevent) {
- if (dispatchers_xevent_.might_have_observers()) {
- base::ObserverList<XEventDispatcher>::Iterator iter(&dispatchers_xevent_);
- while (XEventDispatcher* dispatcher = iter.GetNext()) {
- if (dispatcher->DispatchXEvent(xevent))
- break;
- }
+ for (XEventDispatcher& dispatcher : dispatchers_xevent_) {
+ if (dispatcher.DispatchXEvent(xevent))
+ break;
}
}
« no previous file with comments | « ui/events/platform/platform_event_source.cc ('k') | ui/views/mus/pointer_watcher_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698