| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BLINK_BLINK_EVENT_UTIL_H_ | 5 #ifndef UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ |
| 6 #define UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ | 6 #define UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 10 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| 11 #include "ui/events/gesture_detection/motion_event.h" | 11 #include "ui/events/gesture_detection/motion_event.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 class WebGestureEvent; | 14 class WebGestureEvent; |
| 15 class WebInputEvent; | 15 class WebInputEvent; |
| 16 class WebTouchEvent; | 16 class WebTouchEvent; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace gfx { | 19 namespace gfx { |
| 20 class PointF; | 20 class PointF; |
| 21 class Vector2d; | 21 class Vector2d; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace ui { | 24 namespace ui { |
| 25 enum class DomCode; | 25 enum class DomCode; |
| 26 struct GestureEventData; | 26 struct GestureEventData; |
| 27 struct GestureEventDetails; | 27 struct GestureEventDetails; |
| 28 class MotionEvent; | 28 class MotionEvent; |
| 29 | 29 |
| 30 bool CanCoalesce(const blink::WebInputEvent& event_to_coalesce, |
| 31 const blink::WebInputEvent& event); |
| 32 |
| 33 void Coalesce(const blink::WebInputEvent& event_to_coalesce, |
| 34 blink::WebInputEvent* event); |
| 35 |
| 30 blink::WebTouchEvent CreateWebTouchEventFromMotionEvent( | 36 blink::WebTouchEvent CreateWebTouchEventFromMotionEvent( |
| 31 const MotionEvent& event, | 37 const MotionEvent& event, |
| 32 bool may_cause_scrolling); | 38 bool may_cause_scrolling); |
| 33 | 39 |
| 34 blink::WebGestureEvent CreateWebGestureEvent(const GestureEventDetails& details, | 40 blink::WebGestureEvent CreateWebGestureEvent(const GestureEventDetails& details, |
| 35 base::TimeTicks timestamp, | 41 base::TimeTicks timestamp, |
| 36 const gfx::PointF& location, | 42 const gfx::PointF& location, |
| 37 const gfx::PointF& raw_location, | 43 const gfx::PointF& raw_location, |
| 38 int flags, | 44 int flags, |
| 39 uint32_t unique_touch_event_id); | 45 uint32_t unique_touch_event_id); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 67 float orientation_rad, | 73 float orientation_rad, |
| 68 float tilt_rad, | 74 float tilt_rad, |
| 69 int android_buttons_changed, | 75 int android_buttons_changed, |
| 70 int tool_type); | 76 int tool_type); |
| 71 | 77 |
| 72 int WebEventModifiersToEventFlags(int modifiers); | 78 int WebEventModifiersToEventFlags(int modifiers); |
| 73 | 79 |
| 74 blink::WebInputEvent::Modifiers DomCodeToWebInputEventModifiers( | 80 blink::WebInputEvent::Modifiers DomCodeToWebInputEventModifiers( |
| 75 ui::DomCode code); | 81 ui::DomCode code); |
| 76 | 82 |
| 83 bool IsGestureScollOrPinch(blink::WebInputEvent::Type); |
| 84 |
| 85 bool IsContinuousGestureEvent(blink::WebInputEvent::Type); |
| 86 |
| 77 } // namespace ui | 87 } // namespace ui |
| 78 | 88 |
| 79 #endif // UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ | 89 #endif // UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ |
| OLD | NEW |