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

Unified Diff: ash/magnifier/magnification_controller.cc

Issue 11568006: events: Update scroll and touch handlers to not return EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self-nit Created 8 years 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 | « ash/launcher/overflow_bubble.cc ('k') | ash/system/tray/tray_event_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/magnifier/magnification_controller.cc
diff --git a/ash/magnifier/magnification_controller.cc b/ash/magnifier/magnification_controller.cc
index b7e90c13b555dd6ae6b19396fe693654a150b141..0912e37dba9b37595313c0c023e06b8514f04a61 100644
--- a/ash/magnifier/magnification_controller.cc
+++ b/ash/magnifier/magnification_controller.cc
@@ -115,7 +115,7 @@ class MagnificationControllerImpl : virtual public MagnificationController,
// ui::EventHandler overrides:
virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE;
- virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
+ virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
aura::RootWindow* root_window_;
@@ -506,12 +506,13 @@ ui::EventResult MagnificationControllerImpl::OnMouseEvent(
return ui::ER_UNHANDLED;
}
-ui::EventResult MagnificationControllerImpl::OnScrollEvent(
+void MagnificationControllerImpl::OnScrollEvent(
ui::ScrollEvent* event) {
if (event->IsAltDown() && event->IsControlDown()) {
if (event->type() == ui::ET_SCROLL_FLING_START ||
event->type() == ui::ET_SCROLL_FLING_CANCEL) {
- return ui::ER_CONSUMED;
+ event->StopPropagation();
+ return;
}
if (event->type() == ui::ET_SCROLL) {
@@ -519,11 +520,10 @@ ui::EventResult MagnificationControllerImpl::OnScrollEvent(
float scale = GetScale();
scale += scroll_event->y_offset() * kScrollScaleChangeFactor;
SetScale(scale, true);
- return ui::ER_CONSUMED;
+ event->StopPropagation();
+ return;
}
}
-
- return ui::ER_UNHANDLED;
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « ash/launcher/overflow_bubble.cc ('k') | ash/system/tray/tray_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698