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

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

Issue 567783002: Add modifier flags to MotionEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove MotionEvent modifiers Created 6 years, 3 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_detection/motion_event.h" 11 #include "ui/events/gesture_detection/motion_event.h"
12 #include "ui/events/gesture_event_details.h" 12 #include "ui/events/gesture_event_details.h"
13 13
14 namespace ui { 14 namespace ui {
15 15
16 class GestureEventDataPacket; 16 class GestureEventDataPacket;
17 17
18 struct GESTURE_DETECTION_EXPORT GestureEventData { 18 struct GESTURE_DETECTION_EXPORT GestureEventData {
19 GestureEventData(const GestureEventDetails&, 19 GestureEventData(const GestureEventDetails&,
20 int motion_event_id, 20 int motion_event_id,
21 MotionEvent::ToolType primary_tool_type, 21 MotionEvent::ToolType primary_tool_type,
22 base::TimeTicks time, 22 base::TimeTicks time,
23 float x, 23 float x,
24 float y, 24 float y,
25 float raw_x, 25 float raw_x,
26 float raw_y, 26 float raw_y,
27 size_t touch_point_count, 27 size_t touch_point_count,
28 const gfx::RectF& bounding_box); 28 const gfx::RectF& bounding_box,
29 int flags);
29 GestureEventData(EventType type, const GestureEventData&); 30 GestureEventData(EventType type, const GestureEventData&);
30 31
31 EventType type() const { return details.type(); } 32 EventType type() const { return details.type(); }
32 33
33 GestureEventDetails details; 34 GestureEventDetails details;
34 int motion_event_id; 35 int motion_event_id;
35 MotionEvent::ToolType primary_tool_type; 36 MotionEvent::ToolType primary_tool_type;
36 base::TimeTicks time; 37 base::TimeTicks time;
37 float x; 38 float x;
38 float y; 39 float y;
39 float raw_x; 40 float raw_x;
40 float raw_y; 41 float raw_y;
42 int flags;
41 43
42 private: 44 private:
43 friend class GestureEventDataPacket; 45 friend class GestureEventDataPacket;
44 46
45 // Initializes type to GESTURE_TYPE_INVALID. 47 // Initializes type to GESTURE_TYPE_INVALID.
46 GestureEventData(); 48 GestureEventData();
47 }; 49 };
48 50
49 } // namespace ui 51 } // namespace ui
50 52
51 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_ 53 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698