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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // Convenience wrapper for |CreateWebGestureEvent| using the supplied |data|. | 44 // Convenience wrapper for |CreateWebGestureEvent| using the supplied |data|. |
45 blink::WebGestureEvent CreateWebGestureEventFromGestureEventData( | 45 blink::WebGestureEvent CreateWebGestureEventFromGestureEventData( |
46 const GestureEventData& data); | 46 const GestureEventData& data); |
47 | 47 |
48 int EventFlagsToWebEventModifiers(int flags); | 48 int EventFlagsToWebEventModifiers(int flags); |
49 | 49 |
50 std::unique_ptr<blink::WebInputEvent> ScaleWebInputEvent( | 50 std::unique_ptr<blink::WebInputEvent> ScaleWebInputEvent( |
51 const blink::WebInputEvent& event, | 51 const blink::WebInputEvent& event, |
52 float scale); | 52 float scale); |
53 | 53 |
| 54 std::unique_ptr<blink::WebInputEvent> TranslateAndScaleWebInputEvent( |
| 55 const blink::WebInputEvent& event, |
| 56 int delta_x, |
| 57 int delta_y, |
| 58 float scale); |
| 59 |
54 blink::WebPointerProperties::PointerType ToWebPointerType( | 60 blink::WebPointerProperties::PointerType ToWebPointerType( |
55 MotionEvent::ToolType tool_type); | 61 MotionEvent::ToolType tool_type); |
56 | 62 |
57 int WebEventModifiersToEventFlags(int modifiers); | 63 int WebEventModifiersToEventFlags(int modifiers); |
58 | 64 |
59 blink::WebInputEvent::Modifiers DomCodeToWebInputEventModifiers( | 65 blink::WebInputEvent::Modifiers DomCodeToWebInputEventModifiers( |
60 ui::DomCode code); | 66 ui::DomCode code); |
61 | 67 |
62 } // namespace ui | 68 } // namespace ui |
63 | 69 |
64 #endif // UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ | 70 #endif // UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ |
OLD | NEW |