Chromium Code Reviews| Index: ui/events/event_utils.h |
| diff --git a/ui/events/event_utils.h b/ui/events/event_utils.h |
| index bc8906ceceecd9b7672b5736b3f7ba4a18b0a573..61b3a6109e1fd75767621ceadfd8ba8469b49a25 100644 |
| --- a/ui/events/event_utils.h |
| +++ b/ui/events/event_utils.h |
| @@ -179,6 +179,11 @@ EVENTS_EXPORT void UpdateX11EventForChangedButtonFlags(MouseEvent* event); |
| // Registers a custom event type. |
| EVENTS_EXPORT int RegisterCustomEventType(); |
| +// Convenience function that casts |event| to a LocatedEvent if it is one, |
| +// otherwise returns null. |
| +EVENTS_EXPORT const ui::LocatedEvent* ToLocatedEventOrNull( |
|
sky
2016/06/16 16:50:02
+sadrul for his thoughts. I prefer a static on Loc
bruthig
2016/06/16 19:50:02
Moved to LocatedEvent::AsLocatedEventIfLocatedEven
sadrul
2016/06/17 16:03:22
We could have LocatedEvent::From(ui::Event*); whic
|
| + const ui::Event* event); |
| + |
| } // namespace ui |
| #endif // UI_EVENTS_EVENT_UTILS_H_ |