OLD | NEW |
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 CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_PACKET_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_PACKET_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_PACKET_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_PACKET_H_ |
7 | 7 |
8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
9 #include "third_party/WebKit/public/web/WebInputEvent.h" | 9 #include "third_party/WebKit/public/web/WebInputEvent.h" |
10 | 10 |
| 11 namespace ui { |
| 12 class MotionEvent; |
| 13 } |
| 14 |
11 namespace content { | 15 namespace content { |
12 | 16 |
13 // Acts as a transport container for gestures created (directly or indirectly) | 17 // Acts as a transport container for gestures created (directly or indirectly) |
14 // by a touch event. | 18 // by a touch event. |
15 class CONTENT_EXPORT GestureEventPacket { | 19 class CONTENT_EXPORT GestureEventPacket { |
16 public: | 20 public: |
17 enum GestureSource { | 21 enum GestureSource { |
18 UNDEFINED = -1, // Used only for a default-constructed packet. | 22 UNDEFINED = -1, // Used only for a default-constructed packet. |
19 INVALID, // The source of the gesture was invalid. | 23 INVALID, // The source of the gesture was invalid. |
20 TOUCH_SEQUENCE_BEGIN, // The start of a new gesture sequence. | 24 TOUCH_SEQUENCE_BEGIN, // The start of a new gesture sequence. |
(...skipping 23 matching lines...) Expand all Loading... |
44 | 48 |
45 enum { kMaxGesturesPerTouch = 5 }; | 49 enum { kMaxGesturesPerTouch = 5 }; |
46 blink::WebGestureEvent gestures_[kMaxGesturesPerTouch]; | 50 blink::WebGestureEvent gestures_[kMaxGesturesPerTouch]; |
47 size_t gesture_count_; | 51 size_t gesture_count_; |
48 GestureSource gesture_source_; | 52 GestureSource gesture_source_; |
49 }; | 53 }; |
50 | 54 |
51 } // namespace content | 55 } // namespace content |
52 | 56 |
53 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_PACKET_H_ | 57 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_PACKET_H_ |
OLD | NEW |