Index: ui/ozone/platform/drm/host/drm_window_host.cc |
diff --git a/ui/ozone/platform/drm/host/drm_window_host.cc b/ui/ozone/platform/drm/host/drm_window_host.cc |
index 647756053b1935a2113b54bf036347fc8e34f921..d4501ba374fdfd2cbdcbccf9c24d494435ea8661 100644 |
--- a/ui/ozone/platform/drm/host/drm_window_host.cc |
+++ b/ui/ozone/platform/drm/host/drm_window_host.cc |
@@ -160,7 +160,7 @@ bool DrmWindowHost::CanDispatchEvent(const PlatformEvent& ne) { |
snapshot->current_mode()->size()); |
return display_bounds == bounds_; |
} else if (event->IsLocatedEvent()) { |
- LocatedEvent* located_event = static_cast<LocatedEvent*>(event); |
+ LocatedEvent* located_event = event->AsLocatedEvent(); |
return bounds_.Contains(located_event->location()); |
} |
@@ -174,7 +174,7 @@ uint32_t DrmWindowHost::DispatchEvent(const PlatformEvent& native_event) { |
Event* event = static_cast<Event*>(native_event); |
if (event->IsLocatedEvent()) { |
// Make the event location relative to this window's origin. |
- LocatedEvent* located_event = static_cast<LocatedEvent*>(event); |
+ LocatedEvent* located_event = event->AsLocatedEvent(); |
gfx::PointF location = located_event->location_f(); |
location -= gfx::Vector2dF(bounds_.OffsetFromOrigin()); |
located_event->set_location_f(location); |