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

Unified Diff: ui/events/gesture_event_details.h

Issue 321563002: Support minimum gesture bounds in GestureProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/gesture_event_details.h
diff --git a/ui/events/gesture_event_details.h b/ui/events/gesture_event_details.h
index 6b36d4bf9d163b822294e7581ced686beb3b54ef..32db808bf72ee84d911690f5bc71f3ba3776da4d 100644
--- a/ui/events/gesture_event_details.h
+++ b/ui/events/gesture_event_details.h
@@ -21,7 +21,10 @@ struct EVENTS_BASE_EXPORT GestureEventDetails {
EventType type() const { return type_; }
int touch_points() const { return touch_points_; }
- void set_touch_points(int touch_points) { touch_points_ = touch_points; }
+ void set_touch_points(int touch_points) {
+ DCHECK_GT(touch_points, 0);
+ touch_points_ = touch_points;
+ }
// TODO(tdresser): Return RectF. See crbug.com/337824.
const gfx::Rect bounding_box() const {
@@ -107,6 +110,7 @@ struct EVENTS_BASE_EXPORT GestureEventDetails {
}
void set_tap_count(int tap_count) {
+ DCHECK_GE(tap_count, 0);
DCHECK(type_ == ET_GESTURE_TAP ||
type_ == ET_GESTURE_TAP_UNCONFIRMED ||
type_ == ET_GESTURE_DOUBLE_TAP);
« no previous file with comments | « ui/events/gesture_detection/touch_disposition_gesture_filter_unittest.cc ('k') | ui/events/gesture_event_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698