summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authormoshayedi <moshayedi@chromium.org>2016-03-01 20:53:58 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-02 04:55:14 +0000
commit4e6623013973747a357b11dd1ff0bb646e1db249 (patch)
treee2266e0ae3912d8ef22303fb583023ef6e7636f5 /ash
parent0c12856b59827e462642d3ed8ce2d7042bcf7218 (diff)
downloadchromium_src-4e6623013973747a357b11dd1ff0bb646e1db249.zip
chromium_src-4e6623013973747a357b11dd1ff0bb646e1db249.tar.gz
chromium_src-4e6623013973747a357b11dd1ff0bb646e1db249.tar.bz2
Use convenience methods for casting to Mouse/Wheel/Scroll/Touch/Key events.
BUG=NONE Review URL: https://codereview.chromium.org/1752483003 Cr-Commit-Position: refs/heads/master@{#378691}
Diffstat (limited to 'ash')
-rw-r--r--ash/magnifier/magnification_controller.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/ash/magnifier/magnification_controller.cc b/ash/magnifier/magnification_controller.cc
index c48d820..39ede8b 100644
--- a/ash/magnifier/magnification_controller.cc
+++ b/ash/magnifier/magnification_controller.cc
@@ -671,7 +671,7 @@ void MagnificationControllerImpl::OnScrollEvent(ui::ScrollEvent* event) {
}
if (event->type() == ui::ET_SCROLL) {
- ui::ScrollEvent* scroll_event = static_cast<ui::ScrollEvent*>(event);
+ ui::ScrollEvent* scroll_event = event->AsScrollEvent();
float scale = GetScale();
scale += scroll_event->y_offset() * kScrollScaleChangeFactor;
SetScale(scale, true);