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

Side by Side Diff: ui/events/gestures/motion_event_aura.h

Issue 531133002: Revert of Completed webkit radiusX, radiusY and rotationAngle handling. (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 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_UI_MOTION_EVENT_H_ 5 #ifndef UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_H_
6 #define UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_H_ 6 #define UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 16 matching lines...) Expand all
27 virtual int GetId() const OVERRIDE; 27 virtual int GetId() const OVERRIDE;
28 virtual Action GetAction() const OVERRIDE; 28 virtual Action GetAction() const OVERRIDE;
29 virtual int GetActionIndex() const OVERRIDE; 29 virtual int GetActionIndex() const OVERRIDE;
30 virtual size_t GetPointerCount() const OVERRIDE; 30 virtual size_t GetPointerCount() const OVERRIDE;
31 virtual int GetPointerId(size_t pointer_index) const OVERRIDE; 31 virtual int GetPointerId(size_t pointer_index) const OVERRIDE;
32 virtual float GetX(size_t pointer_index) const OVERRIDE; 32 virtual float GetX(size_t pointer_index) const OVERRIDE;
33 virtual float GetY(size_t pointer_index) const OVERRIDE; 33 virtual float GetY(size_t pointer_index) const OVERRIDE;
34 virtual float GetRawX(size_t pointer_index) const OVERRIDE; 34 virtual float GetRawX(size_t pointer_index) const OVERRIDE;
35 virtual float GetRawY(size_t pointer_index) const OVERRIDE; 35 virtual float GetRawY(size_t pointer_index) const OVERRIDE;
36 virtual float GetTouchMajor(size_t pointer_index) const OVERRIDE; 36 virtual float GetTouchMajor(size_t pointer_index) const OVERRIDE;
37 virtual float GetTouchMinor(size_t pointer_index) const OVERRIDE;
38 virtual float GetOrientation(size_t pointer_index) const OVERRIDE;
39 virtual float GetPressure(size_t pointer_index) const OVERRIDE; 37 virtual float GetPressure(size_t pointer_index) const OVERRIDE;
40 virtual ToolType GetToolType(size_t pointer_index) const OVERRIDE; 38 virtual ToolType GetToolType(size_t pointer_index) const OVERRIDE;
41 virtual int GetButtonState() const OVERRIDE; 39 virtual int GetButtonState() const OVERRIDE;
42 virtual base::TimeTicks GetEventTime() const OVERRIDE; 40 virtual base::TimeTicks GetEventTime() const OVERRIDE;
43 41
44 virtual scoped_ptr<MotionEvent> Clone() const OVERRIDE; 42 virtual scoped_ptr<MotionEvent> Clone() const OVERRIDE;
45 virtual scoped_ptr<MotionEvent> Cancel() const OVERRIDE; 43 virtual scoped_ptr<MotionEvent> Cancel() const OVERRIDE;
46 44
47 int GetSourceDeviceId(size_t pointer_index) const; 45 int GetSourceDeviceId(size_t pointer_index) const;
48 46
49 // We can't cleanup removed touch points immediately upon receipt of a 47 // We can't cleanup removed touch points immediately upon receipt of a
50 // TouchCancel or TouchRelease, as the MotionEvent needs to be able to report 48 // TouchCancel or TouchRelease, as the MotionEvent needs to be able to report
51 // information about those touch events. Once the MotionEvent has been 49 // information about those touch events. Once the MotionEvent has been
52 // processed, we call CleanupRemovedTouchPoints to do the required 50 // processed, we call CleanupRemovedTouchPoints to do the required
53 // book-keeping. 51 // book-keeping.
54 void CleanupRemovedTouchPoints(const TouchEvent& event); 52 void CleanupRemovedTouchPoints(const TouchEvent& event);
55 53
56 private: 54 private:
57 struct PointData { 55 struct PointData {
58 PointData(); 56 PointData();
59 float x; 57 float x;
60 float y; 58 float y;
61 float raw_x; 59 float raw_x;
62 float raw_y; 60 float raw_y;
63 int touch_id; 61 int touch_id;
64 float pressure; 62 float pressure;
65 int source_device_id; 63 int source_device_id;
66 float touch_major; 64 float major_radius;
67 float touch_minor;
68 float orientation;
69 }; 65 };
70 66
71 MotionEventAura( 67 MotionEventAura(
72 size_t pointer_count, 68 size_t pointer_count,
73 const base::TimeTicks& last_touch_time, 69 const base::TimeTicks& last_touch_time,
74 Action cached_action, 70 Action cached_action,
75 int cached_action_index, 71 int cached_action_index,
76 const PointData (&active_touches)[MotionEvent::MAX_TOUCH_POINT_COUNT]); 72 const PointData (&active_touches)[MotionEvent::MAX_TOUCH_POINT_COUNT]);
77 73
78 static PointData GetPointDataFromTouchEvent(const TouchEvent& touch); 74 static PointData GetPointDataFromTouchEvent(const TouchEvent& touch);
(...skipping 11 matching lines...) Expand all
90 86
91 // We want constant time indexing by pointer_index, and fast indexing by id. 87 // We want constant time indexing by pointer_index, and fast indexing by id.
92 PointData active_touches_[MotionEvent::MAX_TOUCH_POINT_COUNT]; 88 PointData active_touches_[MotionEvent::MAX_TOUCH_POINT_COUNT];
93 89
94 DISALLOW_COPY_AND_ASSIGN(MotionEventAura); 90 DISALLOW_COPY_AND_ASSIGN(MotionEventAura);
95 }; 91 };
96 92
97 } // namespace ui 93 } // namespace ui
98 94
99 #endif // UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_H_ 95 #endif // UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_H_
OLDNEW
« no previous file with comments | « ui/events/gestures/gesture_provider_aura_unittest.cc ('k') | ui/events/gestures/motion_event_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698