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

Unified Diff: ui/events/gesture_detection/motion_event.h

Issue 567783002: Add modifier flags to MotionEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/gesture_detection/motion_event.h
diff --git a/ui/events/gesture_detection/motion_event.h b/ui/events/gesture_detection/motion_event.h
index 0a8ace773585af35ba9d394edf2415ed93eb02a7..37a55c034fd747b519ec782ae63335bd64d25841 100644
--- a/ui/events/gesture_detection/motion_event.h
+++ b/ui/events/gesture_detection/motion_event.h
@@ -40,6 +40,15 @@ class GESTURE_DETECTION_EXPORT MotionEvent {
BUTTON_FORWARD = 1 << 4,
};
+ enum Modifiers {
tdresser 2014/09/11 20:51:18 Where are these used?
jdduke (slow) 2014/09/11 20:51:57 Oops, they're not, I'll remove.
jdduke (slow) 2014/09/11 20:57:17 Done.
+ MODIFIER_SHIFT = 1 << 0,
+ MODIFIER_CONTROL = 1 << 1,
+ MODIFIER_ALT = 1 << 2,
+ MODIFIER_META = 1 << 3,
+ MODIFIER_CAPS_LOCK_ON = 1 << 4,
+ MODIFIER_NUM_LOCK_ON = 1 << 5
+ };
+
// The implementer promises that |GetPointerId()| will never exceed
// MAX_POINTER_ID.
enum { MAX_POINTER_ID = 31, MAX_TOUCH_POINT_COUNT = 12 };
@@ -63,6 +72,7 @@ class GESTURE_DETECTION_EXPORT MotionEvent {
virtual float GetPressure(size_t pointer_index) const = 0;
virtual ToolType GetToolType(size_t pointer_index) const = 0;
virtual int GetButtonState() const = 0;
+ virtual int GetFlags() const = 0;
virtual base::TimeTicks GetEventTime() const = 0;
// Optional historical data, default implementation provides an empty history.
« no previous file with comments | « ui/events/gesture_detection/gesture_provider_unittest.cc ('k') | ui/events/gesture_detection/motion_event_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698