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

Unified Diff: ui/events/gesture_detection/gesture_detector.h

Issue 2058723003: Slop region check for multi-finger scroll (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/events/gesture_detection/gesture_detector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/gesture_detection/gesture_detector.h
diff --git a/ui/events/gesture_detection/gesture_detector.h b/ui/events/gesture_detection/gesture_detector.h
index 4788be870eb6167a7d00b79c80ab9d81bb53d049..df5e6d5ec773a9b0b304ca139936c73cba7f99c6 100644
--- a/ui/events/gesture_detection/gesture_detector.h
+++ b/ui/events/gesture_detection/gesture_detector.h
@@ -110,6 +110,7 @@ class GESTURE_DETECTION_EXPORT GestureDetector {
const MotionEvent& first_up,
const MotionEvent& second_down) const;
bool HandleSwipeIfNeeded(const MotionEvent& up, float vx, float vy);
+ bool IsWithinTouchSlop(const MotionEvent& ev);
class TimeoutGestureHandler;
std::unique_ptr<TimeoutGestureHandler> timeout_handler_;
@@ -130,7 +131,7 @@ class GESTURE_DETECTION_EXPORT GestureDetector {
bool still_down_;
bool defer_confirm_single_tap_;
- bool always_in_tap_region_;
+ bool all_pointers_within_slop_regions_;
bool always_in_bigger_tap_region_;
bool two_finger_tap_allowed_for_gesture_;
@@ -148,6 +149,10 @@ class GESTURE_DETECTION_EXPORT GestureDetector {
// disabled.
bool is_down_candidate_for_repeated_single_tap_;
+ // Stores the maximum number of pointers that have been down simultaneously
+ // during the current touch sequence.
+ int maximum_pointer_count_;
+
// The number of repeated taps in the current sequence, i.e., for the initial
// tap this is 0, for the first *repeated* tap 1, etc...
int current_single_tap_repeat_count_;
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/events/gesture_detection/gesture_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698