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

Unified Diff: ui/events/gesture_detection/gesture_event_data_packet.cc

Issue 680413006: Re-enable Eager Gesture Recognition on Aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix out of order ack problem. Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/gesture_detection/gesture_event_data_packet.cc
diff --git a/ui/events/gesture_detection/gesture_event_data_packet.cc b/ui/events/gesture_detection/gesture_event_data_packet.cc
index 265300cc1fcdfb7bf0c137ce0e2d09b7790b464c..1983db77cf3b84826002906e667d4ad2995f215f 100644
--- a/ui/events/gesture_detection/gesture_event_data_packet.cc
+++ b/ui/events/gesture_detection/gesture_event_data_packet.cc
@@ -32,10 +32,6 @@ GestureEventDataPacket::GestureSource ToGestureSource(
} // namespace
-GestureEventDataPacket::GestureEventDataPacket()
- : gesture_source_(UNDEFINED) {
-}
-
GestureEventDataPacket::GestureEventDataPacket(
base::TimeTicks timestamp,
GestureSource source,
@@ -44,17 +40,25 @@ GestureEventDataPacket::GestureEventDataPacket(
: timestamp_(timestamp),
touch_location_(touch_location),
raw_touch_location_(raw_touch_location),
- gesture_source_(source) {
- DCHECK_NE(gesture_source_, UNDEFINED);
tdresser 2014/11/20 19:32:54 I'm not sure if this is an improvement, or if I ju
jdduke (slow) 2014/11/20 19:49:16 You can keep the DCHECK for the constructor that t
tdresser 2014/11/21 13:25:21 Not if the other constructors delegate to the cons
+ gesture_source_(source),
+ marked_to_ignore_(false) {
+}
+
+GestureEventDataPacket::GestureEventDataPacket()
+ : GestureEventDataPacket(base::TimeTicks(),
+ UNDEFINED,
+ gfx::PointF(0, 0),
jdduke (slow) 2014/11/20 19:49:16 You can just do gfx::PointF().
tdresser 2014/11/21 13:25:21 Done.
+ gfx::PointF(0, 0)) {
}
GestureEventDataPacket::GestureEventDataPacket(
const GestureEventDataPacket& other)
- : timestamp_(other.timestamp_),
- gestures_(other.gestures_),
- touch_location_(other.touch_location_),
- raw_touch_location_(other.raw_touch_location_),
- gesture_source_(other.gesture_source_) {
+ : GestureEventDataPacket(other.timestamp_,
+ other.gesture_source_,
+ other.touch_location_,
+ other.raw_touch_location_) {
+ gestures_ = other.gestures_;
jdduke (slow) 2014/11/20 19:49:16 Why not keep these in the initialize list?
tdresser 2014/11/21 13:25:22 Because, quoth the clang: "error: an initializer f
+ marked_to_ignore_ = other.marked_to_ignore_;
}
GestureEventDataPacket::~GestureEventDataPacket() {

Powered by Google App Engine
This is Rietveld 408576698