| 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/WebGestureEvent.h" | 10 #include "third_party/WebKit/public/platform/WebGestureEvent.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 const gfx::Vector2d& delta, | 70 const gfx::Vector2d& delta, |
| 71 float scale); | 71 float scale); |
| 72 | 72 |
| 73 blink::WebInputEvent::Type ToWebMouseEventType(MotionEvent::Action action); | 73 blink::WebInputEvent::Type ToWebMouseEventType(MotionEvent::Action action); |
| 74 | 74 |
| 75 void SetWebPointerPropertiesFromMotionEventData( | 75 void SetWebPointerPropertiesFromMotionEventData( |
| 76 blink::WebPointerProperties& webPointerProperties, | 76 blink::WebPointerProperties& webPointerProperties, |
| 77 int pointer_id, | 77 int pointer_id, |
| 78 float pressure, | 78 float pressure, |
| 79 float orientation_rad, | 79 float orientation_rad, |
| 80 float tilt_rad, | 80 float tilt_x, |
| 81 float tilt_y, |
| 81 int android_buttons_changed, | 82 int android_buttons_changed, |
| 82 int tool_type); | 83 int tool_type); |
| 83 | 84 |
| 84 int WebEventModifiersToEventFlags(int modifiers); | 85 int WebEventModifiersToEventFlags(int modifiers); |
| 85 | 86 |
| 86 blink::WebInputEvent::Modifiers DomCodeToWebInputEventModifiers( | 87 blink::WebInputEvent::Modifiers DomCodeToWebInputEventModifiers( |
| 87 ui::DomCode code); | 88 ui::DomCode code); |
| 88 | 89 |
| 89 bool IsGestureScrollOrFlingOrPinch(blink::WebInputEvent::Type); | 90 bool IsGestureScrollOrFlingOrPinch(blink::WebInputEvent::Type); |
| 90 | 91 |
| 91 bool IsContinuousGestureEvent(blink::WebInputEvent::Type); | 92 bool IsContinuousGestureEvent(blink::WebInputEvent::Type); |
| 92 | 93 |
| 93 inline const blink::WebGestureEvent& ToWebGestureEvent( | 94 inline const blink::WebGestureEvent& ToWebGestureEvent( |
| 94 const blink::WebInputEvent& event) { | 95 const blink::WebInputEvent& event) { |
| 95 DCHECK(blink::WebInputEvent::IsGestureEventType(event.GetType())); | 96 DCHECK(blink::WebInputEvent::IsGestureEventType(event.GetType())); |
| 96 return static_cast<const blink::WebGestureEvent&>(event); | 97 return static_cast<const blink::WebGestureEvent&>(event); |
| 97 } | 98 } |
| 98 | 99 |
| 99 } // namespace ui | 100 } // namespace ui |
| 100 | 101 |
| 101 #endif // UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ | 102 #endif // UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ |
| OLD | NEW |