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 "base/memory/scoped_ptr.h" | 8 #include <memory> |
| 9 |
9 #include "third_party/WebKit/public/web/WebInputEvent.h" | 10 #include "third_party/WebKit/public/web/WebInputEvent.h" |
10 #include "ui/events/gesture_detection/motion_event.h" | 11 #include "ui/events/gesture_detection/motion_event.h" |
11 | 12 |
12 namespace base { | 13 namespace base { |
13 class TimeDelta; | 14 class TimeDelta; |
14 } | 15 } |
15 | 16 |
16 namespace blink { | 17 namespace blink { |
17 class WebGestureEvent; | 18 class WebGestureEvent; |
18 class WebInputEvent; | 19 class WebInputEvent; |
(...skipping 18 matching lines...) Expand all Loading... |
37 const gfx::PointF& location, | 38 const gfx::PointF& location, |
38 const gfx::PointF& raw_location, | 39 const gfx::PointF& raw_location, |
39 int flags); | 40 int flags); |
40 | 41 |
41 // Convenience wrapper for |CreateWebGestureEvent| using the supplied |data|. | 42 // Convenience wrapper for |CreateWebGestureEvent| using the supplied |data|. |
42 blink::WebGestureEvent CreateWebGestureEventFromGestureEventData( | 43 blink::WebGestureEvent CreateWebGestureEventFromGestureEventData( |
43 const GestureEventData& data); | 44 const GestureEventData& data); |
44 | 45 |
45 int EventFlagsToWebEventModifiers(int flags); | 46 int EventFlagsToWebEventModifiers(int flags); |
46 | 47 |
47 scoped_ptr<blink::WebInputEvent> ScaleWebInputEvent( | 48 std::unique_ptr<blink::WebInputEvent> ScaleWebInputEvent( |
48 const blink::WebInputEvent& event, | 49 const blink::WebInputEvent& event, |
49 float scale); | 50 float scale); |
50 | 51 |
51 blink::WebPointerProperties::PointerType ToWebPointerType( | 52 blink::WebPointerProperties::PointerType ToWebPointerType( |
52 MotionEvent::ToolType tool_type); | 53 MotionEvent::ToolType tool_type); |
53 | 54 |
54 } // namespace ui | 55 } // namespace ui |
55 | 56 |
56 #endif // UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ | 57 #endif // UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_ |
OLD | NEW |