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

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

Issue 1187273004: Pass MotionEvent tilt angles to Blink on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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_GENERIC_H_ 5 #ifndef UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_GENERIC_H_
6 #define UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_GENERIC_H_ 6 #define UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_GENERIC_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/containers/stack_container.h" 9 #include "base/containers/stack_container.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 16 matching lines...) Expand all
27 int id; 27 int id;
28 MotionEvent::ToolType tool_type; 28 MotionEvent::ToolType tool_type;
29 float x; 29 float x;
30 float y; 30 float y;
31 float raw_x; 31 float raw_x;
32 float raw_y; 32 float raw_y;
33 float pressure; 33 float pressure;
34 float touch_major; 34 float touch_major;
35 float touch_minor; 35 float touch_minor;
36 float orientation; 36 float orientation;
37 float tilt;
37 // source_device_id is only used on Aura. 38 // source_device_id is only used on Aura.
38 int source_device_id; 39 int source_device_id;
39 }; 40 };
40 41
41 // A generic MotionEvent implementation. 42 // A generic MotionEvent implementation.
42 class GESTURE_DETECTION_EXPORT MotionEventGeneric : public MotionEvent { 43 class GESTURE_DETECTION_EXPORT MotionEventGeneric : public MotionEvent {
43 public: 44 public:
44 MotionEventGeneric(Action action, 45 MotionEventGeneric(Action action,
45 base::TimeTicks event_time, 46 base::TimeTicks event_time,
46 const PointerProperties& pointer); 47 const PointerProperties& pointer);
47 MotionEventGeneric(const MotionEventGeneric& other); 48 MotionEventGeneric(const MotionEventGeneric& other);
48 49
49 ~MotionEventGeneric() override; 50 ~MotionEventGeneric() override;
50 51
51 // MotionEvent implementation. 52 // MotionEvent implementation.
52 uint32 GetUniqueEventId() const override; 53 uint32 GetUniqueEventId() const override;
53 Action GetAction() const override; 54 Action GetAction() const override;
54 int GetActionIndex() const override; 55 int GetActionIndex() const override;
55 size_t GetPointerCount() const override; 56 size_t GetPointerCount() const override;
56 int GetPointerId(size_t pointer_index) const override; 57 int GetPointerId(size_t pointer_index) const override;
57 float GetX(size_t pointer_index) const override; 58 float GetX(size_t pointer_index) const override;
58 float GetY(size_t pointer_index) const override; 59 float GetY(size_t pointer_index) const override;
59 float GetRawX(size_t pointer_index) const override; 60 float GetRawX(size_t pointer_index) const override;
60 float GetRawY(size_t pointer_index) const override; 61 float GetRawY(size_t pointer_index) const override;
61 float GetTouchMajor(size_t pointer_index) const override; 62 float GetTouchMajor(size_t pointer_index) const override;
62 float GetTouchMinor(size_t pointer_index) const override; 63 float GetTouchMinor(size_t pointer_index) const override;
63 float GetOrientation(size_t pointer_index) const override; 64 float GetOrientation(size_t pointer_index) const override;
64 float GetPressure(size_t pointer_index) const override; 65 float GetPressure(size_t pointer_index) const override;
66 float GetTilt(size_t pointer_index) const override;
65 ToolType GetToolType(size_t pointer_index) const override; 67 ToolType GetToolType(size_t pointer_index) const override;
66 int GetButtonState() const override; 68 int GetButtonState() const override;
67 int GetFlags() const override; 69 int GetFlags() const override;
68 base::TimeTicks GetEventTime() const override; 70 base::TimeTicks GetEventTime() const override;
69 size_t GetHistorySize() const override; 71 size_t GetHistorySize() const override;
70 base::TimeTicks GetHistoricalEventTime( 72 base::TimeTicks GetHistoricalEventTime(
71 size_t historical_index) const override; 73 size_t historical_index) const override;
72 float GetHistoricalTouchMajor(size_t pointer_index, 74 float GetHistoricalTouchMajor(size_t pointer_index,
73 size_t historical_index) const override; 75 size_t historical_index) const override;
74 float GetHistoricalX(size_t pointer_index, 76 float GetHistoricalX(size_t pointer_index,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 int action_index_; 121 int action_index_;
120 int button_state_; 122 int button_state_;
121 int flags_; 123 int flags_;
122 base::StackVector<PointerProperties, kTypicalMaxPointerCount> pointers_; 124 base::StackVector<PointerProperties, kTypicalMaxPointerCount> pointers_;
123 ScopedVector<MotionEvent> historical_events_; 125 ScopedVector<MotionEvent> historical_events_;
124 }; 126 };
125 127
126 } // namespace ui 128 } // namespace ui
127 129
128 #endif // UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_GENERIC_H_ 130 #endif // UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_GENERIC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698