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

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

Issue 321563002: Support minimum gesture bounds in GestureProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak test 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(EventType type, 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 int touch_point_count, 23 int touch_point_count,
24 const gfx::RectF& bounding_box, 24 const gfx::RectF& bounding_box);
25 const GestureEventDetails& details);
26 25
27 GestureEventData(EventType type, 26 GestureEventData(EventType type,
28 int motion_event_id, 27 int motion_event_id,
29 base::TimeTicks time, 28 base::TimeTicks time,
30 float x, 29 float x,
31 float y, 30 float y,
32 int touch_point_count, 31 int touch_point_count,
33 const gfx::RectF& bounding_box); 32 const gfx::RectF& bounding_box);
34 33
35 EventType type; 34 EventType type() const { return details.type(); }
tdresser 2014/06/09 13:36:38 Awesome, thanks.
35
36 GestureEventDetails details;
36 int motion_event_id; 37 int motion_event_id;
37 base::TimeTicks time; 38 base::TimeTicks time;
38 float x; 39 float x;
39 float y; 40 float y;
40 41
41 GestureEventDetails details;
42
43 private: 42 private:
44 friend class GestureEventDataPacket; 43 friend class GestureEventDataPacket;
45 44
46 // Initializes type to GESTURE_TYPE_INVALID. 45 // Initializes type to GESTURE_TYPE_INVALID.
47 GestureEventData(); 46 GestureEventData();
48 }; 47 };
49 48
50 } // namespace ui 49 } // namespace ui
51 50
52 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_ 51 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698