| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BASE_GESTURES_GESTURE_TYPES_H_ | 5 #ifndef UI_BASE_GESTURES_GESTURE_TYPES_H_ |
| 6 #define UI_BASE_GESTURES_GESTURE_TYPES_H_ | 6 #define UI_BASE_GESTURES_GESTURE_TYPES_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "ui/base/events.h" | 10 #include "ui/base/events.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 class UI_EXPORT GestureEventHelper { | 62 class UI_EXPORT GestureEventHelper { |
| 63 public: | 63 public: |
| 64 virtual ~GestureEventHelper() { | 64 virtual ~GestureEventHelper() { |
| 65 } | 65 } |
| 66 | 66 |
| 67 // |flags| is ui::EventFlags. The meaning of |param_first| and |param_second| | 67 // |flags| is ui::EventFlags. The meaning of |param_first| and |param_second| |
| 68 // depends on the specific gesture type (|type|). | 68 // depends on the specific gesture type (|type|). |
| 69 virtual GestureEvent* CreateGestureEvent(EventType type, | 69 virtual GestureEvent* CreateGestureEvent(EventType type, |
| 70 const gfx::Point& location, | 70 const gfx::Point& location, |
| 71 int flags, | 71 int flags, |
| 72 const base::Time time, | 72 const base::Time& time, |
| 73 float param_first, | 73 float param_first, |
| 74 float param_second, | 74 float param_second, |
| 75 unsigned int touch_id_bitfield) = 0; | 75 unsigned int touch_id_bitfield) = 0; |
| 76 | 76 |
| 77 virtual TouchEvent* CreateTouchEvent(EventType type, | 77 virtual TouchEvent* CreateTouchEvent(EventType type, |
| 78 const gfx::Point& location, | 78 const gfx::Point& location, |
| 79 int touch_id, | 79 int touch_id, |
| 80 base::TimeDelta time_stamp) = 0; | 80 const base::TimeDelta& time_stamp) = 0; |
| 81 | 81 |
| 82 virtual bool DispatchLongPressGestureEvent(GestureEvent* event) = 0; | 82 virtual bool DispatchLongPressGestureEvent(GestureEvent* event) = 0; |
| 83 virtual bool DispatchCancelTouchEvent(TouchEvent* event) = 0; | 83 virtual bool DispatchCancelTouchEvent(TouchEvent* event) = 0; |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace ui | 86 } // namespace ui |
| 87 | 87 |
| 88 #endif // UI_BASE_GESTURES_GESTURE_TYPES_H_ | 88 #endif // UI_BASE_GESTURES_GESTURE_TYPES_H_ |
| OLD | NEW |