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

Side by Side Diff: ui/events/gesture_detection/motion_event.h

Issue 999423003: Set the unique_event_id when converting from TouchEvent to WebTouchEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_EVENTS_GESTURE_DETECTION_MOTION_EVENT_H_ 5 #ifndef UI_EVENTS_GESTURE_DETECTION_MOTION_EVENT_H_
6 #define UI_EVENTS_GESTURE_DETECTION_MOTION_EVENT_H_ 6 #define UI_EVENTS_GESTURE_DETECTION_MOTION_EVENT_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "ui/events/gesture_detection/gesture_detection_export.h" 10 #include "ui/events/gesture_detection/gesture_detection_export.h"
(...skipping 28 matching lines...) Expand all
39 BUTTON_BACK = 1 << 3, 39 BUTTON_BACK = 1 << 3,
40 BUTTON_FORWARD = 1 << 4, 40 BUTTON_FORWARD = 1 << 4,
41 }; 41 };
42 42
43 // The implementer promises that |GetPointerId()| will never exceed 43 // The implementer promises that |GetPointerId()| will never exceed
44 // MAX_POINTER_ID. 44 // MAX_POINTER_ID.
45 enum { MAX_POINTER_ID = 31, MAX_TOUCH_POINT_COUNT = 16 }; 45 enum { MAX_POINTER_ID = 31, MAX_TOUCH_POINT_COUNT = 16 };
46 46
47 virtual ~MotionEvent() {} 47 virtual ~MotionEvent() {}
48 48
49 // The touch ID of the first touch point of this motion event.
49 virtual int GetId() const = 0; 50 virtual int GetId() const = 0;
jdduke (slow) 2015/04/09 15:40:35 Hmm, so why don't we just have a GetPointerId() ac
51
52 // An unique identifier for the touch event which is converted to this motion
53 // event.
tdresser 2015/04/09 12:33:06 This comment isn't quite right, because on Android
lanwei 2015/04/16 17:09:06 Done.
54 virtual uint64 GetUniqueEventId() const = 0;
50 virtual Action GetAction() const = 0; 55 virtual Action GetAction() const = 0;
51 // Only valid if |GetAction()| returns ACTION_POINTER_UP or 56 // Only valid if |GetAction()| returns ACTION_POINTER_UP or
52 // ACTION_POINTER_DOWN. 57 // ACTION_POINTER_DOWN.
53 virtual int GetActionIndex() const = 0; 58 virtual int GetActionIndex() const = 0;
54 virtual size_t GetPointerCount() const = 0; 59 virtual size_t GetPointerCount() const = 0;
55 virtual int GetPointerId(size_t pointer_index) const = 0; 60 virtual int GetPointerId(size_t pointer_index) const = 0;
56 virtual float GetX(size_t pointer_index) const = 0; 61 virtual float GetX(size_t pointer_index) const = 0;
57 virtual float GetY(size_t pointer_index) const = 0; 62 virtual float GetY(size_t pointer_index) const = 0;
58 virtual float GetRawX(size_t pointer_index) const = 0; 63 virtual float GetRawX(size_t pointer_index) const = 0;
59 virtual float GetRawY(size_t pointer_index) const = 0; 64 virtual float GetRawY(size_t pointer_index) const = 0;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // They guarantee only that the returned type will reflect the same 109 // They guarantee only that the returned type will reflect the same
105 // data exposed by the MotionEvent interface; no guarantees are made that the 110 // data exposed by the MotionEvent interface; no guarantees are made that the
106 // underlying implementation is identical to the source implementation. 111 // underlying implementation is identical to the source implementation.
107 scoped_ptr<MotionEvent> Clone() const; 112 scoped_ptr<MotionEvent> Clone() const;
108 scoped_ptr<MotionEvent> Cancel() const; 113 scoped_ptr<MotionEvent> Cancel() const;
109 }; 114 };
110 115
111 } // namespace ui 116 } // namespace ui
112 117
113 #endif // UI_EVENTS_GESTURE_DETECTION_MOTION_EVENT_H_ 118 #endif // UI_EVENTS_GESTURE_DETECTION_MOTION_EVENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698