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

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

Issue 2843543002: Missing source pointer down events are handled. (Closed)
Patch Set: Created 3 years, 7 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_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 <memory> 8 #include <memory>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 bool is_double_tapping() const { return is_double_tapping_; } 97 bool is_double_tapping() const { return is_double_tapping_; }
98 98
99 void set_longpress_enabled(bool enabled) { longpress_enabled_ = enabled; } 99 void set_longpress_enabled(bool enabled) { longpress_enabled_ = enabled; }
100 void set_showpress_enabled(bool enabled) { showpress_enabled_ = enabled; } 100 void set_showpress_enabled(bool enabled) { showpress_enabled_ = enabled; }
101 101
102 // Returns the event storing the initial position of the pointer with given 102 // Returns the event storing the initial position of the pointer with given
103 // pointer ID. This returns nullptr if the source event isn't 103 // pointer ID. This returns nullptr if the source event isn't
104 // current_down_event_ or secondary_pointer_down_event_. 104 // current_down_event_ or secondary_pointer_down_event_.
105 const MotionEvent* GetSourcePointerDownEvent( 105 const MotionEvent* GetSourcePointerDownEvent(
106 const MotionEvent& current_down_event, 106 const MotionEvent* current_down_event,
tdresser 2017/05/11 16:57:27 We always have a current_down_event, don't we?
sahel 2017/05/11 17:26:19 yes, we do.
107 const MotionEvent& secondary_pointer_down_event, 107 const MotionEvent* secondary_pointer_down_event,
108 const int pointer_id); 108 const int pointer_id);
109 109
110 private: 110 private:
111 void Init(const Config& config); 111 void Init(const Config& config);
112 void OnShowPressTimeout(); 112 void OnShowPressTimeout();
113 void OnLongPressTimeout(); 113 void OnLongPressTimeout();
114 void OnTapTimeout(); 114 void OnTapTimeout();
115 void Cancel(); 115 void Cancel();
116 void CancelTaps(); 116 void CancelTaps();
117 bool IsRepeatedTap(const MotionEvent& first_down, 117 bool IsRepeatedTap(const MotionEvent& first_down,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 // Determines speed during touch scrolling. 179 // Determines speed during touch scrolling.
180 VelocityTrackerState velocity_tracker_; 180 VelocityTrackerState velocity_tracker_;
181 181
182 DISALLOW_COPY_AND_ASSIGN(GestureDetector); 182 DISALLOW_COPY_AND_ASSIGN(GestureDetector);
183 }; 183 };
184 184
185 } // namespace ui 185 } // namespace ui
186 186
187 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_DETECTOR_H_ 187 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_DETECTOR_H_
OLDNEW
« no previous file with comments | « no previous file | ui/events/gesture_detection/gesture_detector.cc » ('j') | ui/events/gesture_detection/gesture_detector.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698