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

Unified Diff: ui/wm/core/compound_event_filter.cc

Issue 982413002: base: Stop passing a non-const ref to ObserverListBase::Iterator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: observerref: fixwindowsbuild Created 5 years, 9 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/compound_event_filter.cc
diff --git a/ui/wm/core/compound_event_filter.cc b/ui/wm/core/compound_event_filter.cc
index 134e3821ab8c6a63d74ff9d97b5ea466d16a2462..490bc13d7561dc2c3f831c7e27b6c0c3a2cd9f1f 100644
--- a/ui/wm/core/compound_event_filter.cc
+++ b/ui/wm/core/compound_event_filter.cc
@@ -130,7 +130,7 @@ void CompoundEventFilter::UpdateCursor(aura::Window* target,
void CompoundEventFilter::FilterKeyEvent(ui::KeyEvent* event) {
if (handlers_.might_have_observers()) {
- ObserverListBase<ui::EventHandler>::Iterator it(handlers_);
+ ObserverListBase<ui::EventHandler>::Iterator it(&handlers_);
ui::EventHandler* handler;
while (!event->stopped_propagation() && (handler = it.GetNext()) != NULL)
handler->OnKeyEvent(event);
@@ -139,7 +139,7 @@ void CompoundEventFilter::FilterKeyEvent(ui::KeyEvent* event) {
void CompoundEventFilter::FilterMouseEvent(ui::MouseEvent* event) {
if (handlers_.might_have_observers()) {
- ObserverListBase<ui::EventHandler>::Iterator it(handlers_);
+ ObserverListBase<ui::EventHandler>::Iterator it(&handlers_);
ui::EventHandler* handler;
while (!event->stopped_propagation() && (handler = it.GetNext()) != NULL)
handler->OnMouseEvent(event);
@@ -148,7 +148,7 @@ void CompoundEventFilter::FilterMouseEvent(ui::MouseEvent* event) {
void CompoundEventFilter::FilterTouchEvent(ui::TouchEvent* event) {
if (handlers_.might_have_observers()) {
- ObserverListBase<ui::EventHandler>::Iterator it(handlers_);
+ ObserverListBase<ui::EventHandler>::Iterator it(&handlers_);
ui::EventHandler* handler;
while (!event->stopped_propagation() && (handler = it.GetNext()) != NULL)
handler->OnTouchEvent(event);
@@ -242,7 +242,7 @@ void CompoundEventFilter::OnTouchEvent(ui::TouchEvent* event) {
void CompoundEventFilter::OnGestureEvent(ui::GestureEvent* event) {
if (handlers_.might_have_observers()) {
- ObserverListBase<ui::EventHandler>::Iterator it(handlers_);
+ ObserverListBase<ui::EventHandler>::Iterator it(&handlers_);
ui::EventHandler* handler;
while (!event->stopped_propagation() && (handler = it.GetNext()) != NULL)
handler->OnGestureEvent(event);
« no previous file with comments | « ui/events/platform/platform_event_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698