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

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

Issue 302463004: Implementing the dispatch of the swipe gesture for one-finger touch swipes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implementing review feedback. Created 6 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
« no previous file with comments | « ui/events/event_constants.h ('k') | ui/events/gesture_detection/gesture_detector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_GESTURE_DETECTOR_H_ 5 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_DETECTOR_H_
6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_DETECTOR_H_ 6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_DETECTOR_H_
7 7
8 #include "base/logging.h" 8 #include "base/logging.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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 private: 150 private:
151 void Init(const Config& config); 151 void Init(const Config& config);
152 void OnShowPressTimeout(); 152 void OnShowPressTimeout();
153 void OnLongPressTimeout(); 153 void OnLongPressTimeout();
154 void OnTapTimeout(); 154 void OnTapTimeout();
155 void Cancel(); 155 void Cancel();
156 void CancelTaps(); 156 void CancelTaps();
157 bool IsConsideredDoubleTap(const MotionEvent& first_down, 157 bool IsConsideredDoubleTap(const MotionEvent& first_down,
158 const MotionEvent& first_up, 158 const MotionEvent& first_up,
159 const MotionEvent& second_down) const; 159 const MotionEvent& second_down) const;
160 bool HandleSwipeIfNeeded(const MotionEvent& up, float vx, float vy);
160 161
161 class TimeoutGestureHandler; 162 class TimeoutGestureHandler;
162 scoped_ptr<TimeoutGestureHandler> timeout_handler_; 163 scoped_ptr<TimeoutGestureHandler> timeout_handler_;
163 GestureListener* const listener_; 164 GestureListener* const listener_;
164 DoubleTapListener* double_tap_listener_; 165 DoubleTapListener* double_tap_listener_;
165 166
166 float touch_slop_square_; 167 float touch_slop_square_;
167 float double_tap_touch_slop_square_; 168 float double_tap_touch_slop_square_;
168 float double_tap_slop_square_; 169 float double_tap_slop_square_;
169 float two_finger_tap_distance_square_; 170 float two_finger_tap_distance_square_;
(...skipping 30 matching lines...) Expand all
200 201
201 // Determines speed during touch scrolling. 202 // Determines speed during touch scrolling.
202 VelocityTrackerState velocity_tracker_; 203 VelocityTrackerState velocity_tracker_;
203 204
204 DISALLOW_COPY_AND_ASSIGN(GestureDetector); 205 DISALLOW_COPY_AND_ASSIGN(GestureDetector);
205 }; 206 };
206 207
207 } // namespace ui 208 } // namespace ui
208 209
209 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_DETECTOR_H_ 210 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_DETECTOR_H_
OLDNEW
« no previous file with comments | « ui/events/event_constants.h ('k') | ui/events/gesture_detection/gesture_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698