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

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

Issue 2869823003: [VSync Queue] Plug touch ack to gesture events and flush vsync queue if necessary (Closed)
Patch Set: Fix MSAN Use-of-uninitialized-value: Initialize GestureEventDetails 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 bool is_source_touch_event_set_non_blocking() const {
49 return is_source_touch_event_set_non_blocking_;
50 }
51 void set_is_source_touch_event_set_non_blocking(
52 bool is_source_touch_event_set_non_blocking) {
53 is_source_touch_event_set_non_blocking_ =
54 is_source_touch_event_set_non_blocking;
55 }
56
48 int touch_points() const { return touch_points_; } 57 int touch_points() const { return touch_points_; }
49 void set_touch_points(int touch_points) { 58 void set_touch_points(int touch_points) {
50 DCHECK_GT(touch_points, 0); 59 DCHECK_GT(touch_points, 0);
51 touch_points_ = touch_points; 60 touch_points_ = touch_points;
52 } 61 }
53 62
54 const gfx::Rect bounding_box() const { 63 const gfx::Rect bounding_box() const {
55 return ToEnclosingRect(bounding_box_); 64 return ToEnclosingRect(bounding_box_);
56 } 65 }
57 66
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 bool down; 227 bool down;
219 } swipe; 228 } swipe;
220 229
221 // Tap information must be set for ET_GESTURE_TAP, 230 // Tap information must be set for ET_GESTURE_TAP,
222 // ET_GESTURE_TAP_UNCONFIRMED, and ET_GESTURE_DOUBLE_TAP events. 231 // ET_GESTURE_TAP_UNCONFIRMED, and ET_GESTURE_DOUBLE_TAP events.
223 int tap_count; // TAP repeat count. 232 int tap_count; // TAP repeat count.
224 } data_; 233 } data_;
225 234
226 GestureDeviceType device_type_; 235 GestureDeviceType device_type_;
227 236
237 bool is_source_touch_event_set_non_blocking_ = false;
chongz 2017/06/19 20:24:39 |GestureEventDetails.is_source_touch_event_set_non
238
228 int touch_points_; // Number of active touch points in the gesture. 239 int touch_points_; // Number of active touch points in the gesture.
229 240
230 // Bounding box is an axis-aligned rectangle that contains all the 241 // Bounding box is an axis-aligned rectangle that contains all the
231 // enclosing rectangles of the touch-points in the gesture. 242 // enclosing rectangles of the touch-points in the gesture.
232 gfx::RectF bounding_box_; 243 gfx::RectF bounding_box_;
233 }; 244 };
234 245
235 } // namespace ui 246 } // namespace ui
236 247
237 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ 248 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698