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 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1046 // Number of fingers on the pad. | 1046 // Number of fingers on the pad. |
1047 int finger_count_; | 1047 int finger_count_; |
1048 }; | 1048 }; |
1049 | 1049 |
1050 class EVENTS_EXPORT GestureEvent : public LocatedEvent { | 1050 class EVENTS_EXPORT GestureEvent : public LocatedEvent { |
1051 public: | 1051 public: |
1052 GestureEvent(float x, | 1052 GestureEvent(float x, |
1053 float y, | 1053 float y, |
1054 int flags, | 1054 int flags, |
1055 base::TimeDelta time_stamp, | 1055 base::TimeDelta time_stamp, |
1056 const GestureEventDetails& details); | 1056 const GestureEventDetails& details); |
Rick Byers
2016/06/08 20:42:48
Should we plan to eliminate this ctor variant even
mustaq
2016/06/08 20:53:16
We have 83 calls to this ctor, only 4 of them are
| |
1057 | 1057 |
1058 GestureEvent(float x, | |
1059 float y, | |
1060 int flags, | |
1061 base::TimeDelta time_stamp, | |
1062 const GestureEventDetails& details, | |
1063 uint32_t unique_touch_event_id); | |
1064 | |
1058 // Create a new GestureEvent which is identical to the provided model. | 1065 // Create a new GestureEvent which is identical to the provided model. |
1059 // If source / target windows are provided, the model location will be | 1066 // If source / target windows are provided, the model location will be |
1060 // converted from |source| coordinate system to |target| coordinate system. | 1067 // converted from |source| coordinate system to |target| coordinate system. |
1061 template <typename T> | 1068 template <typename T> |
1062 GestureEvent(const GestureEvent& model, T* source, T* target) | 1069 GestureEvent(const GestureEvent& model, T* source, T* target) |
1063 : LocatedEvent(model, source, target), | 1070 : LocatedEvent(model, source, target), |
1064 details_(model.details_) { | 1071 details_(model.details_) { |
1065 } | 1072 } |
1066 | 1073 |
1067 ~GestureEvent() override; | 1074 ~GestureEvent() override; |
1068 | 1075 |
1069 const GestureEventDetails& details() const { return details_; } | 1076 const GestureEventDetails& details() const { return details_; } |
1070 | 1077 |
1078 uint32_t unique_touch_event_id() const { | |
1079 return unique_touch_event_id_; | |
1080 } | |
1081 | |
1071 private: | 1082 private: |
1072 // For (de)serialization. | 1083 // For (de)serialization. |
1073 GestureEvent(EventType type, base::TimeDelta time_stamp, int flags) | 1084 GestureEvent(EventType type, base::TimeDelta time_stamp, int flags) |
1074 : LocatedEvent(type, time_stamp, flags) {} | 1085 : LocatedEvent(type, time_stamp, flags) {} |
1075 friend struct IPC::ParamTraits<ui::ScopedEvent>; | 1086 friend struct IPC::ParamTraits<ui::ScopedEvent>; |
1076 friend struct IPC::ParamTraits<ui::GestureEvent>; | 1087 friend struct IPC::ParamTraits<ui::GestureEvent>; |
1077 | 1088 |
1078 GestureEventDetails details_; | 1089 GestureEventDetails details_; |
1090 uint32_t unique_touch_event_id_; | |
1079 }; | 1091 }; |
1080 | 1092 |
1081 } // namespace ui | 1093 } // namespace ui |
1082 | 1094 |
1083 #endif // UI_EVENTS_EVENT_H_ | 1095 #endif // UI_EVENTS_EVENT_H_ |
OLD | NEW |