Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 DCHECK_EQ(ET_GESTURE_SCROLL_UPDATE, type_); | 90 DCHECK_EQ(ET_GESTURE_SCROLL_UPDATE, type_); |
| 91 return data_.scroll_update.delta_units; | 91 return data_.scroll_update.delta_units; |
| 92 } | 92 } |
| 93 | 93 |
| 94 float velocity_x() const { | 94 float velocity_x() const { |
| 95 DCHECK_EQ(ET_SCROLL_FLING_START, type_); | 95 DCHECK_EQ(ET_SCROLL_FLING_START, type_); |
| 96 return data_.fling_velocity.x; | 96 return data_.fling_velocity.x; |
| 97 } | 97 } |
| 98 | 98 |
| 99 float velocity_y() const { | 99 float velocity_y() const { |
| 100 DCHECK_EQ(ET_SCROLL_FLING_START, type_); | 100 DCHECK(ET_SCROLL_FLING_START == type_ || ET_GESTURE_SCROLL_UPDATE == type_); |
|
sadrul
2017/06/20 20:43:38
Where do we set the velocity for SCROLL_UPDATE?
newcomer
2017/06/20 21:23:34
It seems like it is not set:
https://cs.chromium.o
sadrul
2017/06/20 21:39:00
I think that code wants scroll_y(), and it happens
newcomer
2017/06/20 23:42:43
Oh, interesting. Done! Thanks for your help.
| |
| 101 return data_.fling_velocity.y; | 101 return data_.fling_velocity.y; |
| 102 } | 102 } |
| 103 | 103 |
| 104 float first_finger_width() const { | 104 float first_finger_width() const { |
| 105 DCHECK_EQ(ET_GESTURE_TWO_FINGER_TAP, type_); | 105 DCHECK_EQ(ET_GESTURE_TWO_FINGER_TAP, type_); |
| 106 return data_.first_finger_enclosing_rectangle.width; | 106 return data_.first_finger_enclosing_rectangle.width; |
| 107 } | 107 } |
| 108 | 108 |
| 109 float first_finger_height() const { | 109 float first_finger_height() const { |
| 110 DCHECK_EQ(ET_GESTURE_TWO_FINGER_TAP, type_); | 110 DCHECK_EQ(ET_GESTURE_TWO_FINGER_TAP, type_); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 228 int touch_points_; // Number of active touch points in the gesture. | 228 int touch_points_; // Number of active touch points in the gesture. |
| 229 | 229 |
| 230 // Bounding box is an axis-aligned rectangle that contains all the | 230 // Bounding box is an axis-aligned rectangle that contains all the |
| 231 // enclosing rectangles of the touch-points in the gesture. | 231 // enclosing rectangles of the touch-points in the gesture. |
| 232 gfx::RectF bounding_box_; | 232 gfx::RectF bounding_box_; |
| 233 }; | 233 }; |
| 234 | 234 |
| 235 } // namespace ui | 235 } // namespace ui |
| 236 | 236 |
| 237 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ | 237 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_ |
| OLD | NEW |