OLD | NEW |
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_GESTURE_PROVIDER_H_ | 5 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ |
6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ | 6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/events/gesture_detection/gesture_detection_export.h" | 10 #include "ui/events/gesture_detection/gesture_detection_export.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 const ui::MotionEvent* current_down_event() const { | 77 const ui::MotionEvent* current_down_event() const { |
78 return current_down_event_.get(); | 78 return current_down_event_.get(); |
79 } | 79 } |
80 | 80 |
81 private: | 81 private: |
82 void InitGestureDetectors(const Config& config); | 82 void InitGestureDetectors(const Config& config); |
83 | 83 |
84 bool CanHandle(const MotionEvent& event) const; | 84 bool CanHandle(const MotionEvent& event) const; |
85 | 85 |
86 void Fling(base::TimeTicks time, | 86 void Fling(base::TimeTicks time, |
| 87 int motion_event_id, |
87 float x, | 88 float x, |
88 float y, | 89 float y, |
89 float velocity_x, | 90 float velocity_x, |
90 float velocity_y); | 91 float velocity_y); |
91 void Send(const GestureEventData& gesture); | 92 void Send(const GestureEventData& gesture); |
92 void SendTapCancelIfNecessary(const MotionEvent& event); | 93 void SendTapCancelIfNecessary(const MotionEvent& event); |
93 bool SendLongTapIfNecessary(const MotionEvent& event); | 94 bool SendLongTapIfNecessary(const MotionEvent& event); |
94 void EndTouchScrollIfNecessary(base::TimeTicks time, | 95 void EndTouchScrollIfNecessary(base::TimeTicks time, |
| 96 int motion_event_id, |
95 bool send_scroll_end_event); | 97 bool send_scroll_end_event); |
96 | 98 |
97 GestureProviderClient* const client_; | 99 GestureProviderClient* const client_; |
98 | 100 |
99 class GestureListenerImpl; | 101 class GestureListenerImpl; |
100 friend class GestureListenerImpl; | 102 friend class GestureListenerImpl; |
101 scoped_ptr<GestureListenerImpl> gesture_listener_; | 103 scoped_ptr<GestureListenerImpl> gesture_listener_; |
102 | 104 |
103 class ScaleGestureListenerImpl; | 105 class ScaleGestureListenerImpl; |
104 friend class ScaleGestureListenerImpl; | 106 friend class ScaleGestureListenerImpl; |
(...skipping 17 matching lines...) Expand all Loading... |
122 | 124 |
123 // Keeps track of the current GESTURE_LONG_PRESS event. If a context menu is | 125 // Keeps track of the current GESTURE_LONG_PRESS event. If a context menu is |
124 // opened after a GESTURE_LONG_PRESS, this is used to insert a | 126 // opened after a GESTURE_LONG_PRESS, this is used to insert a |
125 // GESTURE_TAP_CANCEL for removing any ::active styling. | 127 // GESTURE_TAP_CANCEL for removing any ::active styling. |
126 base::TimeTicks current_longpress_time_; | 128 base::TimeTicks current_longpress_time_; |
127 }; | 129 }; |
128 | 130 |
129 } // namespace ui | 131 } // namespace ui |
130 | 132 |
131 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ | 133 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_PROVIDER_H_ |
OLD | NEW |