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

Side by Side Diff: ui/events/gesture_event_details.h

Issue 2925883003: [Touch Adjustment] Pass primary_pointer_type to WebGestureEvent and disable adjustment for stylus (Closed)
Patch Set: dtapuska's comment: Fix layout test instead Created 3 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
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_EVENT_DETAILS_H_ 5 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_
6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ 6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_
7 7
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 27 matching lines...) Expand all
38 // is compatible and sufficient for that expected by gestures of |type|. 38 // is compatible and sufficient for that expected by gestures of |type|.
39 GestureEventDetails(EventType type, const GestureEventDetails& other); 39 GestureEventDetails(EventType type, const GestureEventDetails& other);
40 40
41 EventType type() const { return type_; } 41 EventType type() const { return type_; }
42 42
43 GestureDeviceType device_type() const { return device_type_; } 43 GestureDeviceType device_type() const { return device_type_; }
44 void set_device_type(GestureDeviceType device_type) { 44 void set_device_type(GestureDeviceType device_type) {
45 device_type_ = device_type; 45 device_type_ = device_type;
46 } 46 }
47 47
48 EventPointerType primary_pointer_type() const {
49 return primary_pointer_type_;
50 }
51 void set_primary_pointer_type(EventPointerType primary_pointer_type) {
52 primary_pointer_type_ = primary_pointer_type;
53 }
54
48 int touch_points() const { return touch_points_; } 55 int touch_points() const { return touch_points_; }
49 void set_touch_points(int touch_points) { 56 void set_touch_points(int touch_points) {
50 DCHECK_GT(touch_points, 0); 57 DCHECK_GT(touch_points, 0);
51 touch_points_ = touch_points; 58 touch_points_ = touch_points;
52 } 59 }
53 60
54 const gfx::Rect bounding_box() const { 61 const gfx::Rect bounding_box() const {
55 return ToEnclosingRect(bounding_box_); 62 return ToEnclosingRect(bounding_box_);
56 } 63 }
57 64
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 bool down; 225 bool down;
219 } swipe; 226 } swipe;
220 227
221 // Tap information must be set for ET_GESTURE_TAP, 228 // Tap information must be set for ET_GESTURE_TAP,
222 // ET_GESTURE_TAP_UNCONFIRMED, and ET_GESTURE_DOUBLE_TAP events. 229 // ET_GESTURE_TAP_UNCONFIRMED, and ET_GESTURE_DOUBLE_TAP events.
223 int tap_count; // TAP repeat count. 230 int tap_count; // TAP repeat count.
224 } data_; 231 } data_;
225 232
226 GestureDeviceType device_type_; 233 GestureDeviceType device_type_;
227 234
235 // The pointer type for the first touch point in the gesture.
236 EventPointerType primary_pointer_type_;
237
228 int touch_points_; // Number of active touch points in the gesture. 238 int touch_points_; // Number of active touch points in the gesture.
229 239
230 // Bounding box is an axis-aligned rectangle that contains all the 240 // Bounding box is an axis-aligned rectangle that contains all the
231 // enclosing rectangles of the touch-points in the gesture. 241 // enclosing rectangles of the touch-points in the gesture.
232 gfx::RectF bounding_box_; 242 gfx::RectF bounding_box_;
233 }; 243 };
234 244
235 } // namespace ui 245 } // namespace ui
236 246
237 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ 247 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698