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

Unified Diff: ui/events/event_utils.h

Issue 2042073002: Centered flood fill style ink drop ripples on mouse/touch points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved InkDropHostView::AsLocatedEvent() to event_utils.(h|cc) as ToLocatedEventOrNull(). Created 4 years, 6 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/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_

Powered by Google App Engine
This is Rietveld 408576698