Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / events / gesture_detection / gesture_event_data.h
blob8727c6d8fb8c00d68f83fd9eb5772e0164e15798
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
3 // found in the LICENSE file.
5 #ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_
6 #define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_
8 #include "base/time/time.h"
9 #include "ui/events/event_constants.h"
10 #include "ui/events/gesture_detection/gesture_detection_export.h"
11 #include "ui/events/gesture_detection/motion_event.h"
12 #include "ui/events/gesture_event_details.h"
14 namespace ui {
16 class GestureEventDataPacket;
18 struct GESTURE_DETECTION_EXPORT GestureEventData {
19 GestureEventData(const GestureEventDetails&,
20 int motion_event_id,
21 MotionEvent::ToolType primary_tool_type,
22 base::TimeTicks time,
23 float x,
24 float y,
25 float raw_x,
26 float raw_y,
27 size_t touch_point_count,
28 const gfx::RectF& bounding_box,
29 int flags);
30 GestureEventData(EventType type, const GestureEventData&);
32 EventType type() const { return details.type(); }
34 GestureEventDetails details;
35 int motion_event_id;
36 MotionEvent::ToolType primary_tool_type;
37 base::TimeTicks time;
38 float x;
39 float y;
40 float raw_x;
41 float raw_y;
42 int flags;
44 private:
45 friend class GestureEventDataPacket;
47 // Initializes type to GESTURE_TYPE_INVALID.
48 GestureEventData();
51 } // namespace ui
53 #endif // UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DATA_H_