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

Side by Side Diff: ui/events/gesture_detection/gesture_event_data.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_H_ 5 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_
6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_ 6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "ui/events/event_constants.h" 9 #include "ui/events/event_constants.h"
10 #include "ui/events/gesture_detection/gesture_detection_export.h" 10 #include "ui/events/gesture_detection/gesture_detection_export.h"
11 #include "ui/events/gesture_event_details.h" 11 #include "ui/events/gesture_event_details.h"
12 12
13 namespace ui { 13 namespace ui {
14 14
15 class GestureEventDataPacket; 15 class GestureEventDataPacket;
16 16
17 struct GESTURE_DETECTION_EXPORT GestureEventData { 17 struct GESTURE_DETECTION_EXPORT GestureEventData {
18 GestureEventData(const GestureEventDetails&, 18 GestureEventData(const GestureEventDetails&,
19 int motion_event_id, 19 int motion_event_id,
20 base::TimeTicks time, 20 base::TimeTicks time,
21 float x, 21 float x,
22 float y, 22 float y,
23 float raw_x,
24 float raw_y,
23 int touch_point_count, 25 int touch_point_count,
24 const gfx::RectF& bounding_box); 26 const gfx::RectF& bounding_box);
25 27 GestureEventData(EventType type, const GestureEventData&);
26 GestureEventData(EventType type,
27 int motion_event_id,
28 base::TimeTicks time,
29 float x,
30 float y,
31 int touch_point_count,
32 const gfx::RectF& bounding_box);
33 28
34 EventType type() const { return details.type(); } 29 EventType type() const { return details.type(); }
35 30
36 GestureEventDetails details; 31 GestureEventDetails details;
37 int motion_event_id; 32 int motion_event_id;
38 base::TimeTicks time; 33 base::TimeTicks time;
39 float x; 34 float x;
40 float y; 35 float y;
36 float raw_x;
37 float raw_y;
41 38
42 private: 39 private:
43 friend class GestureEventDataPacket; 40 friend class GestureEventDataPacket;
44 41
45 // Initializes type to GESTURE_TYPE_INVALID. 42 // Initializes type to GESTURE_TYPE_INVALID.
46 GestureEventData(); 43 GestureEventData();
47 }; 44 };
48 45
49 } // namespace ui 46 } // namespace ui
50 47
51 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_ 48 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698