| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EVENT_H_ | 5 #ifndef UI_EVENTS_EVENT_H_ |
| 6 #define UI_EVENTS_EVENT_H_ | 6 #define UI_EVENTS_EVENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 | 966 |
| 967 // Used for tests. | 967 // Used for tests. |
| 968 ScrollEvent(EventType type, | 968 ScrollEvent(EventType type, |
| 969 const gfx::Point& location, | 969 const gfx::Point& location, |
| 970 base::TimeTicks time_stamp, | 970 base::TimeTicks time_stamp, |
| 971 int flags, | 971 int flags, |
| 972 float x_offset, | 972 float x_offset, |
| 973 float y_offset, | 973 float y_offset, |
| 974 float x_offset_ordinal, | 974 float x_offset_ordinal, |
| 975 float y_offset_ordinal, | 975 float y_offset_ordinal, |
| 976 int finger_count); | 976 int finger_count, |
| 977 EventMomentumPhase momentum_phase = EventMomentumPhase::NONE); |
| 977 | 978 |
| 978 // Scale the scroll event's offset value. | 979 // Scale the scroll event's offset value. |
| 979 // This is useful in the multi-monitor setup where it needs to be scaled | 980 // This is useful in the multi-monitor setup where it needs to be scaled |
| 980 // to provide a consistent user experience. | 981 // to provide a consistent user experience. |
| 981 void Scale(const float factor); | 982 void Scale(const float factor); |
| 982 | 983 |
| 983 float x_offset() const { return x_offset_; } | 984 float x_offset() const { return x_offset_; } |
| 984 float y_offset() const { return y_offset_; } | 985 float y_offset() const { return y_offset_; } |
| 985 float x_offset_ordinal() const { return x_offset_ordinal_; } | 986 float x_offset_ordinal() const { return x_offset_ordinal_; } |
| 986 float y_offset_ordinal() const { return y_offset_ordinal_; } | 987 float y_offset_ordinal() const { return y_offset_ordinal_; } |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1037 // dispatched. This field gets a non-zero value only for gestures that are | 1038 // dispatched. This field gets a non-zero value only for gestures that are |
| 1038 // released through TouchDispositionGestureFilter::SendGesture. The gesture | 1039 // released through TouchDispositionGestureFilter::SendGesture. The gesture |
| 1039 // events that aren't fired directly in response to processing a touch-event | 1040 // events that aren't fired directly in response to processing a touch-event |
| 1040 // (e.g. timer fired ones), this id is zero. See crbug.com/618738. | 1041 // (e.g. timer fired ones), this id is zero. See crbug.com/618738. |
| 1041 uint32_t unique_touch_event_id_; | 1042 uint32_t unique_touch_event_id_; |
| 1042 }; | 1043 }; |
| 1043 | 1044 |
| 1044 } // namespace ui | 1045 } // namespace ui |
| 1045 | 1046 |
| 1046 #endif // UI_EVENTS_EVENT_H_ | 1047 #endif // UI_EVENTS_EVENT_H_ |
| OLD | NEW |