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

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: jochen and dtapuska's comments: Add default value Created 3 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 unified diff | Download patch
« no previous file with comments | « ui/events/gesture_detection/gesture_event_data.cc ('k') | ui/events/gesture_event_details.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_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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 bool is_source_touch_event_set_non_blocking() const { 48 bool is_source_touch_event_set_non_blocking() const {
49 return is_source_touch_event_set_non_blocking_; 49 return is_source_touch_event_set_non_blocking_;
50 } 50 }
51 void set_is_source_touch_event_set_non_blocking( 51 void set_is_source_touch_event_set_non_blocking(
52 bool is_source_touch_event_set_non_blocking) { 52 bool is_source_touch_event_set_non_blocking) {
53 is_source_touch_event_set_non_blocking_ = 53 is_source_touch_event_set_non_blocking_ =
54 is_source_touch_event_set_non_blocking; 54 is_source_touch_event_set_non_blocking;
55 } 55 }
56 56
57 EventPointerType primary_pointer_type() const {
58 return primary_pointer_type_;
59 }
60 void set_primary_pointer_type(EventPointerType primary_pointer_type) {
61 primary_pointer_type_ = primary_pointer_type;
62 }
63
57 int touch_points() const { return touch_points_; } 64 int touch_points() const { return touch_points_; }
58 void set_touch_points(int touch_points) { 65 void set_touch_points(int touch_points) {
59 DCHECK_GT(touch_points, 0); 66 DCHECK_GT(touch_points, 0);
60 touch_points_ = touch_points; 67 touch_points_ = touch_points;
61 } 68 }
62 69
63 const gfx::Rect bounding_box() const { 70 const gfx::Rect bounding_box() const {
64 return ToEnclosingRect(bounding_box_); 71 return ToEnclosingRect(bounding_box_);
65 } 72 }
66 73
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 236
230 // Tap information must be set for ET_GESTURE_TAP, 237 // Tap information must be set for ET_GESTURE_TAP,
231 // ET_GESTURE_TAP_UNCONFIRMED, and ET_GESTURE_DOUBLE_TAP events. 238 // ET_GESTURE_TAP_UNCONFIRMED, and ET_GESTURE_DOUBLE_TAP events.
232 int tap_count; // TAP repeat count. 239 int tap_count; // TAP repeat count.
233 } data_; 240 } data_;
234 241
235 GestureDeviceType device_type_; 242 GestureDeviceType device_type_;
236 243
237 bool is_source_touch_event_set_non_blocking_ = false; 244 bool is_source_touch_event_set_non_blocking_ = false;
238 245
246 // The pointer type for the first touch point in the gesture.
247 EventPointerType primary_pointer_type_ =
248 EventPointerType::POINTER_TYPE_UNKNOWN;
249
239 int touch_points_; // Number of active touch points in the gesture. 250 int touch_points_; // Number of active touch points in the gesture.
240 251
241 // Bounding box is an axis-aligned rectangle that contains all the 252 // Bounding box is an axis-aligned rectangle that contains all the
242 // enclosing rectangles of the touch-points in the gesture. 253 // enclosing rectangles of the touch-points in the gesture.
243 gfx::RectF bounding_box_; 254 gfx::RectF bounding_box_;
244 }; 255 };
245 256
246 } // namespace ui 257 } // namespace ui
247 258
248 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ 259 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/gesture_event_data.cc ('k') | ui/events/gesture_event_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698