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

Side by Side Diff: ui/events/gesture_detection/gesture_event_data_packet.h

Issue 349463002: [Android] Map raw touch coordinates to global gesture locations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 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_DATA_PACKET_H_ 5 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_PACKET_H_
6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_PACKET_H_ 6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_PACKET_H_
7 7
8 #include "ui/events/gesture_detection/gesture_detection_export.h" 8 #include "ui/events/gesture_detection/gesture_detection_export.h"
9 #include "ui/events/gesture_detection/gesture_event_data.h" 9 #include "ui/events/gesture_detection/gesture_event_data.h"
10 10
(...skipping 26 matching lines...) Expand all
37 static GestureEventDataPacket FromTouch(const ui::MotionEvent& touch); 37 static GestureEventDataPacket FromTouch(const ui::MotionEvent& touch);
38 static GestureEventDataPacket FromTouchTimeout( 38 static GestureEventDataPacket FromTouchTimeout(
39 const GestureEventData& gesture); 39 const GestureEventData& gesture);
40 40
41 void Push(const GestureEventData& gesture); 41 void Push(const GestureEventData& gesture);
42 42
43 const base::TimeTicks& timestamp() const { return timestamp_; } 43 const base::TimeTicks& timestamp() const { return timestamp_; }
44 const GestureEventData& gesture(size_t i) const { return gestures_[i]; } 44 const GestureEventData& gesture(size_t i) const { return gestures_[i]; }
45 size_t gesture_count() const { return gesture_count_; } 45 size_t gesture_count() const { return gesture_count_; }
46 GestureSource gesture_source() const { return gesture_source_; } 46 GestureSource gesture_source() const { return gesture_source_; }
47 gfx::PointF touch_location() const { return touch_location_; } 47 const gfx::PointF& touch_location() const { return touch_location_; }
48 const gfx::PointF& raw_touch_location() const { return raw_touch_location_; }
48 49
49 private: 50 private:
50 GestureEventDataPacket(base::TimeTicks timestamp, 51 GestureEventDataPacket(base::TimeTicks timestamp,
51 GestureSource source, 52 GestureSource source,
52 gfx::PointF touch_location); 53 const gfx::PointF& touch_location,
54 const gfx::PointF& raw_touch_location);
53 55
54 enum { kMaxGesturesPerTouch = 5 }; 56 enum { kMaxGesturesPerTouch = 5 };
55 base::TimeTicks timestamp_; 57 base::TimeTicks timestamp_;
56 GestureEventData gestures_[kMaxGesturesPerTouch]; 58 GestureEventData gestures_[kMaxGesturesPerTouch];
57 size_t gesture_count_; 59 size_t gesture_count_;
58 gfx::PointF touch_location_; 60 gfx::PointF touch_location_;
61 gfx::PointF raw_touch_location_;
59 GestureSource gesture_source_; 62 GestureSource gesture_source_;
60 }; 63 };
61 64
62 } // namespace ui 65 } // namespace ui
63 66
64 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_PACKET_H_ 67 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_PACKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698