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

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

Issue 277373002: Pass location with gestures created in TouchDispositionGestureFilter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address jdduke's comments. Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/events/gesture_detection/gesture_event_data_packet.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 48
48 private: 49 private:
49 GestureEventDataPacket(base::TimeTicks timestamp, GestureSource source); 50 GestureEventDataPacket(base::TimeTicks timestamp,
51 GestureSource source,
52 gfx::PointF touch_location);
50 53
51 enum { kMaxGesturesPerTouch = 5 }; 54 enum { kMaxGesturesPerTouch = 5 };
52 base::TimeTicks timestamp_; 55 base::TimeTicks timestamp_;
53 GestureEventData gestures_[kMaxGesturesPerTouch]; 56 GestureEventData gestures_[kMaxGesturesPerTouch];
54 size_t gesture_count_; 57 size_t gesture_count_;
58 gfx::PointF touch_location_;
55 GestureSource gesture_source_; 59 GestureSource gesture_source_;
56 }; 60 };
57 61
58 } // namespace ui 62 } // namespace ui
59 63
60 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_PACKET_H_ 64 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_PACKET_H_
OLDNEW
« no previous file with comments | « no previous file | ui/events/gesture_detection/gesture_event_data_packet.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698