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

Unified Diff: ui/events/event_constants.h

Issue 2193153002: MacViews: Send Mac scrollWheel NSEvents as ui::ET_SCROLL (ui::ScrollEvent). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-ScrollLayers
Patch Set: Support Widget MouseWheelEvent conversion Created 4 years, 3 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_constants.h
diff --git a/ui/events/event_constants.h b/ui/events/event_constants.h
index 840631bc250719da17c7ca53b8bfa995c8f2f4de..e225f975d41cb0e68e7837d10325c22e2610393e 100644
--- a/ui/events/event_constants.h
+++ b/ui/events/event_constants.h
@@ -164,6 +164,25 @@ enum EventPhase {
EP_POSTDISPATCH
};
+// Momentum phase information used for a ScrollEvent.
+enum EventMomentumPhase {
sky 2016/09/23 17:47:08 Is there a reason not to use an enum class here? O
tapted 2016/09/26 11:12:20 Done - No reason not to, apart from consistency wi
+ // Event is a non-momentum update to an event stream already begun.
+ EM_PHASE_NONE,
+
+ // Event is the beginning of an event stream that may result in momentum.
+ EM_PHASE_MAY_BEGIN,
+
+ // Event is an update while in a momentum phase. A "begin" event for the
+ // momentum phase portion of an event stream uses this also, but the scroll
+ // offsets will be zero.
+ EM_PHASE_INERTIAL_UPDATE,
+
+ // Event marks the end of the current event stream. Note that this is also set
+ // for events that are not a "stream", but indicate both the start and end of
+ // the event (e.g. a mouse wheel tick).
+ EM_PHASE_END,
+};
+
// Device ID for Touch and Key Events.
enum EventDeviceId {
ED_UNKNOWN_DEVICE = -1

Powered by Google App Engine
This is Rietveld 408576698