| 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;
|
| }
|
| }
|
|
|
|
|