| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_WEB_INPUT_EVENT_H_ | 5 #ifndef UI_EVENTS_BLINK_WEB_INPUT_EVENT_H_ |
| 6 #define UI_EVENTS_BLINK_WEB_INPUT_EVENT_H_ | 6 #define UI_EVENTS_BLINK_WEB_INPUT_EVENT_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 9 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| 10 | 10 |
| 11 namespace gfx { | 11 namespace gfx { |
| 12 class Point; | 12 class Point; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace ui { | 15 namespace ui { |
| 16 class GestureEvent; | 16 class GestureEvent; |
| 17 class KeyEvent; | 17 class KeyEvent; |
| 18 class LocatedEvent; | 18 class LocatedEvent; |
| 19 class MouseEvent; | 19 class MouseEvent; |
| 20 class MouseWheelEvent; | 20 class MouseWheelEvent; |
| 21 class PointerEvent; |
| 21 class ScrollEvent; | 22 class ScrollEvent; |
| 22 class TouchEvent; | |
| 23 | 23 |
| 24 // Several methods take a |screen_location_callback| which should translate the | 24 // Several methods take a |screen_location_callback| which should translate the |
| 25 // provided coordinates relative to the hosting window, rather than the top | 25 // provided coordinates relative to the hosting window, rather than the top |
| 26 // level platform window. | 26 // level platform window. |
| 27 // | 27 // |
| 28 // If a valid event cannot be created, then the returned events will have the | 28 // If a valid event cannot be created, then the returned events will have the |
| 29 // type UNKNOWN. | 29 // type UNKNOWN. |
| 30 // | 30 // |
| 31 // TODO(jonross): Ideally this callback would not be needed. The callback should | 31 // TODO(jonross): Ideally this callback would not be needed. The callback should |
| 32 // be removed once ui::Event::root_location has been deprecated and replaced | 32 // be removed once ui::Event::root_location has been deprecated and replaced |
| (...skipping 13 matching lines...) Expand all Loading... |
| 46 blink::WebKeyboardEvent MakeWebKeyboardEvent(const KeyEvent& event); | 46 blink::WebKeyboardEvent MakeWebKeyboardEvent(const KeyEvent& event); |
| 47 blink::WebGestureEvent MakeWebGestureEvent( | 47 blink::WebGestureEvent MakeWebGestureEvent( |
| 48 const GestureEvent& event, | 48 const GestureEvent& event, |
| 49 const base::Callback<gfx::Point(const ui::LocatedEvent& event)>& | 49 const base::Callback<gfx::Point(const ui::LocatedEvent& event)>& |
| 50 screen_location_callback); | 50 screen_location_callback); |
| 51 blink::WebGestureEvent MakeWebGestureEvent( | 51 blink::WebGestureEvent MakeWebGestureEvent( |
| 52 const ScrollEvent& event, | 52 const ScrollEvent& event, |
| 53 const base::Callback<gfx::Point(const ui::LocatedEvent& event)>& | 53 const base::Callback<gfx::Point(const ui::LocatedEvent& event)>& |
| 54 screen_location_callback); | 54 screen_location_callback); |
| 55 blink::WebGestureEvent MakeWebGestureEventFlingCancel(); | 55 blink::WebGestureEvent MakeWebGestureEventFlingCancel(); |
| 56 blink::WebTouchEvent MakeWebTouchEvent( |
| 57 const PointerEvent& event, |
| 58 const base::Callback<gfx::Point(const ui::LocatedEvent& event)>& |
| 59 screen_location_callback); |
| 56 | 60 |
| 57 } // namespace ui | 61 } // namespace ui |
| 58 | 62 |
| 59 #endif // UI_EVENTS_BLINK_WEB_INPUT_EVENT_H_ | 63 #endif // UI_EVENTS_BLINK_WEB_INPUT_EVENT_H_ |
| OLD | NEW |