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

Unified Diff: ui/events/ozone/evdev/input_injector_evdev_unittest.cc

Issue 2374213003: Refactored static_cast'ing of events to use the AsXXXEvent() methods. (Closed)
Patch Set: Added IsCancelModeEvent() & AsCancelModeEvent() methods to Event 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
Index: ui/events/ozone/evdev/input_injector_evdev_unittest.cc
diff --git a/ui/events/ozone/evdev/input_injector_evdev_unittest.cc b/ui/events/ozone/evdev/input_injector_evdev_unittest.cc
index fe07e328cf6603320a18d86510c2076f68629b17..d373f6534cc7b2eaf672e6c5ac0810891874f3d3 100644
--- a/ui/events/ozone/evdev/input_injector_evdev_unittest.cc
+++ b/ui/events/ozone/evdev/input_injector_evdev_unittest.cc
@@ -32,9 +32,9 @@ class EventObserver {
void OnEvent(Event* event) {
if (event->IsMouseEvent()) {
if (event->type() == ET_MOUSEWHEEL) {
- OnMouseWheelEvent(static_cast<MouseWheelEvent*>(event));
+ OnMouseWheelEvent(event->AsMouseWheelEvent());
} else {
- OnMouseEvent(static_cast<MouseEvent*>(event));
+ OnMouseEvent(event->AsMouseEvent());
}
}
}

Powered by Google App Engine
This is Rietveld 408576698