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

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

Issue 1989623002: Suppressed MEs for gestures from cancelled PEs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 (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 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 float y_offset_; 1042 float y_offset_;
1043 // Unaccelerated offsets. 1043 // Unaccelerated offsets.
1044 float x_offset_ordinal_; 1044 float x_offset_ordinal_;
1045 float y_offset_ordinal_; 1045 float y_offset_ordinal_;
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 // The constructor takes a default unique_touch_id of zero to support many
1053 // (80+) existing tests that doesn't care about this id.
1052 GestureEvent(float x, 1054 GestureEvent(float x,
1053 float y, 1055 float y,
1054 int flags, 1056 int flags,
1055 base::TimeDelta time_stamp, 1057 base::TimeDelta time_stamp,
1056 const GestureEventDetails& details); 1058 const GestureEventDetails& details,
1059 uint32_t unique_touch_event_id = 0);
1057 1060
1058 // Create a new GestureEvent which is identical to the provided model. 1061 // Create a new GestureEvent which is identical to the provided model.
1059 // If source / target windows are provided, the model location will be 1062 // If source / target windows are provided, the model location will be
1060 // converted from |source| coordinate system to |target| coordinate system. 1063 // converted from |source| coordinate system to |target| coordinate system.
1061 template <typename T> 1064 template <typename T>
1062 GestureEvent(const GestureEvent& model, T* source, T* target) 1065 GestureEvent(const GestureEvent& model, T* source, T* target)
1063 : LocatedEvent(model, source, target), 1066 : LocatedEvent(model, source, target),
1064 details_(model.details_) { 1067 details_(model.details_) {
1065 } 1068 }
1066 1069
1067 ~GestureEvent() override; 1070 ~GestureEvent() override;
1068 1071
1069 const GestureEventDetails& details() const { return details_; } 1072 const GestureEventDetails& details() const { return details_; }
1070 1073
1074 uint32_t unique_touch_event_id() const {
1075 return unique_touch_event_id_;
1076 }
1077
1071 private: 1078 private:
1072 // For (de)serialization. 1079 // For (de)serialization.
1073 GestureEvent(EventType type, base::TimeDelta time_stamp, int flags) 1080 GestureEvent(EventType type, base::TimeDelta time_stamp, int flags)
1074 : LocatedEvent(type, time_stamp, flags) {} 1081 : LocatedEvent(type, time_stamp, flags) {}
1075 friend struct IPC::ParamTraits<ui::ScopedEvent>; 1082 friend struct IPC::ParamTraits<ui::ScopedEvent>;
1076 friend struct IPC::ParamTraits<ui::GestureEvent>; 1083 friend struct IPC::ParamTraits<ui::GestureEvent>;
1077 1084
1078 GestureEventDetails details_; 1085 GestureEventDetails details_;
1086
1087 // The unique id of the touch event that released the gesture event. This
1088 // field gets a non-zero value only for gestures that are released through
1089 // TouchDispositionGestureFilter::SendGesture.
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698