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" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // Transforms coordinates and other properties of |event|, by | 55 // Transforms coordinates and other properties of |event|, by |
56 // 1) translating / shifting by |delta| and | 56 // 1) translating / shifting by |delta| and |
57 // 2) scaling by |scale|. | 57 // 2) scaling by |scale|. |
58 // If |event| does not need to change, returns nullptr. | 58 // If |event| does not need to change, returns nullptr. |
59 // Otherwise, returns the transformed version of |event|. | 59 // Otherwise, returns the transformed version of |event|. |
60 std::unique_ptr<blink::WebInputEvent> TranslateAndScaleWebInputEvent( | 60 std::unique_ptr<blink::WebInputEvent> TranslateAndScaleWebInputEvent( |
61 const blink::WebInputEvent& event, | 61 const blink::WebInputEvent& event, |
62 const gfx::Vector2d& delta, | 62 const gfx::Vector2d& delta, |
63 float scale); | 63 float scale); |
64 | 64 |
65 blink::WebPointerProperties::PointerType ToWebPointerType( | 65 blink::WebInputEvent::Type ToWebMouseEventType(MotionEvent::Action action); |
66 MotionEvent::ToolType tool_type); | 66 |
| 67 void SetWebPointerPropertiesFromMotionEventData( |
| 68 blink::WebPointerProperties& webPointerProperties, |
| 69 int pointer_id, |
| 70 float pressure, |
| 71 float orientation_rad, |
| 72 float tilt_rad, |
| 73 int android_buttons_changed, |
| 74 int tool_type); |
67 | 75 |
68 int WebEventModifiersToEventFlags(int modifiers); | 76 int WebEventModifiersToEventFlags(int modifiers); |
69 | 77 |
70 blink::WebInputEvent::Modifiers DomCodeToWebInputEventModifiers( | 78 blink::WebInputEvent::Modifiers DomCodeToWebInputEventModifiers( |
71 ui::DomCode code); | 79 ui::DomCode code); |
72 | 80 |
73 } // namespace ui | 81 } // namespace ui |
74 | 82 |
75 #endif // UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ | 83 #endif // UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ |
OLD | NEW |