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

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: Created 5 years, 6 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 10 matching lines...) Expand all
21 int id; 21 int id;
22 MotionEvent::ToolType tool_type; 22 MotionEvent::ToolType tool_type;
23 float x; 23 float x;
24 float y; 24 float y;
25 float raw_x; 25 float raw_x;
26 float raw_y; 26 float raw_y;
27 float pressure; 27 float pressure;
28 float touch_major; 28 float touch_major;
29 float touch_minor; 29 float touch_minor;
30 float orientation; 30 float orientation;
31 // TODO(e_hakkinen): Remove either tilt and tilt_orientation or tilt_x and
32 // tilt_y.
33 float tilt;
34 float tilt_orientation;
35 float tilt_x;
36 float tilt_y;
31 // source_device_id is only used on Aura. 37 // source_device_id is only used on Aura.
32 int source_device_id; 38 int source_device_id;
33 }; 39 };
34 40
35 // A generic MotionEvent implementation. 41 // A generic MotionEvent implementation.
36 class GESTURE_DETECTION_EXPORT MotionEventGeneric : public MotionEvent { 42 class GESTURE_DETECTION_EXPORT MotionEventGeneric : public MotionEvent {
37 public: 43 public:
38 MotionEventGeneric(Action action, 44 MotionEventGeneric(Action action,
39 base::TimeTicks event_time, 45 base::TimeTicks event_time,
40 const PointerProperties& pointer); 46 const PointerProperties& pointer);
41 MotionEventGeneric(const MotionEventGeneric& other); 47 MotionEventGeneric(const MotionEventGeneric& other);
42 48
43 ~MotionEventGeneric() override; 49 ~MotionEventGeneric() override;
44 50
45 // MotionEvent implementation. 51 // MotionEvent implementation.
46 uint32 GetUniqueEventId() const override; 52 uint32 GetUniqueEventId() const override;
47 Action GetAction() const override; 53 Action GetAction() const override;
48 int GetActionIndex() const override; 54 int GetActionIndex() const override;
49 size_t GetPointerCount() const override; 55 size_t GetPointerCount() const override;
50 int GetPointerId(size_t pointer_index) const override; 56 int GetPointerId(size_t pointer_index) const override;
51 float GetX(size_t pointer_index) const override; 57 float GetX(size_t pointer_index) const override;
52 float GetY(size_t pointer_index) const override; 58 float GetY(size_t pointer_index) const override;
53 float GetRawX(size_t pointer_index) const override; 59 float GetRawX(size_t pointer_index) const override;
54 float GetRawY(size_t pointer_index) const override; 60 float GetRawY(size_t pointer_index) const override;
55 float GetTouchMajor(size_t pointer_index) const override; 61 float GetTouchMajor(size_t pointer_index) const override;
56 float GetTouchMinor(size_t pointer_index) const override; 62 float GetTouchMinor(size_t pointer_index) const override;
57 float GetOrientation(size_t pointer_index) const override; 63 float GetOrientation(size_t pointer_index) const override;
58 float GetPressure(size_t pointer_index) const override; 64 float GetPressure(size_t pointer_index) const override;
65 // TODO(e_hakkinen): Remove either GetTilt and GetTiltOrientation or GetTiltX
66 // and GetTiltY.
67 float GetTilt(size_t pointer_index) const override;
68 float GetTiltOrientation(size_t pointer_index) const override;
69 float GetTiltX(size_t pointer_index) const override;
70 float GetTiltY(size_t pointer_index) const override;
59 ToolType GetToolType(size_t pointer_index) const override; 71 ToolType GetToolType(size_t pointer_index) const override;
60 int GetButtonState() const override; 72 int GetButtonState() const override;
61 int GetFlags() const override; 73 int GetFlags() const override;
62 base::TimeTicks GetEventTime() const override; 74 base::TimeTicks GetEventTime() const override;
63 size_t GetHistorySize() const override; 75 size_t GetHistorySize() const override;
64 base::TimeTicks GetHistoricalEventTime( 76 base::TimeTicks GetHistoricalEventTime(
65 size_t historical_index) const override; 77 size_t historical_index) const override;
66 float GetHistoricalTouchMajor(size_t pointer_index, 78 float GetHistoricalTouchMajor(size_t pointer_index,
67 size_t historical_index) const override; 79 size_t historical_index) const override;
68 float GetHistoricalX(size_t pointer_index, 80 float GetHistoricalX(size_t pointer_index,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 int action_index_; 125 int action_index_;
114 int button_state_; 126 int button_state_;
115 int flags_; 127 int flags_;
116 base::StackVector<PointerProperties, kTypicalMaxPointerCount> pointers_; 128 base::StackVector<PointerProperties, kTypicalMaxPointerCount> pointers_;
117 ScopedVector<MotionEvent> historical_events_; 129 ScopedVector<MotionEvent> historical_events_;
118 }; 130 };
119 131
120 } // namespace ui 132 } // namespace ui
121 133
122 #endif // UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_GENERIC_H_ 134 #endif // UI_EVENTS_GESTURE_DETECTION_UI_MOTION_EVENT_GENERIC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698