OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 13 matching lines...) Expand all Loading... |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebInputEventConversion_h | 31 #ifndef WebInputEventConversion_h |
32 #define WebInputEventConversion_h | 32 #define WebInputEventConversion_h |
33 | 33 |
| 34 #include <vector> |
34 #include "platform/scroll/ScrollTypes.h" | 35 #include "platform/scroll/ScrollTypes.h" |
35 #include "public/platform/WebInputEvent.h" | 36 #include "public/platform/WebInputEvent.h" |
36 #include "public/platform/WebKeyboardEvent.h" | 37 #include "public/platform/WebKeyboardEvent.h" |
37 #include "public/platform/WebMouseWheelEvent.h" | 38 #include "public/platform/WebMouseWheelEvent.h" |
38 #include "public/platform/WebTouchEvent.h" | 39 #include "public/platform/WebTouchEvent.h" |
39 #include "web/WebExport.h" | 40 #include "web/WebExport.h" |
40 #include "wtf/Compiler.h" | 41 #include "wtf/Compiler.h" |
41 #include <vector> | |
42 | 42 |
43 namespace blink { | 43 namespace blink { |
44 | 44 |
45 class KeyboardEvent; | 45 class KeyboardEvent; |
46 class MouseEvent; | 46 class MouseEvent; |
47 class LayoutItem; | 47 class LayoutItem; |
48 class TouchEvent; | 48 class TouchEvent; |
49 class WebGestureEvent; | 49 class WebGestureEvent; |
50 class WebKeyboardEvent; | 50 class WebKeyboardEvent; |
51 class Widget; | 51 class Widget; |
52 | 52 |
53 // These classes are used to convert from WebInputEvent subclasses to | 53 // These classes are used to convert from WebInputEvent subclasses to |
54 // corresponding WebCore events. | 54 // corresponding WebCore events. |
55 | 55 |
56 | |
57 class WEB_EXPORT WebMouseEventBuilder | 56 class WEB_EXPORT WebMouseEventBuilder |
58 : NON_EXPORTED_BASE(public WebMouseEvent) { | 57 : NON_EXPORTED_BASE(public WebMouseEvent) { |
59 public: | 58 public: |
60 // Converts a MouseEvent to a corresponding WebMouseEvent. | 59 // Converts a MouseEvent to a corresponding WebMouseEvent. |
61 // NOTE: This is only implemented for mousemove, mouseover, mouseout, | 60 // NOTE: This is only implemented for mousemove, mouseover, mouseout, |
62 // mousedown and mouseup. If the event mapping fails, the event type will | 61 // mousedown and mouseup. If the event mapping fails, the event type will |
63 // be set to Undefined. | 62 // be set to Undefined. |
64 WebMouseEventBuilder(const Widget*, const LayoutItem, const MouseEvent&); | 63 WebMouseEventBuilder(const Widget*, const LayoutItem, const MouseEvent&); |
65 WebMouseEventBuilder(const Widget*, const LayoutItem, const TouchEvent&); | 64 WebMouseEventBuilder(const Widget*, const LayoutItem, const TouchEvent&); |
66 }; | 65 }; |
(...skipping 29 matching lines...) Expand all Loading... |
96 WEB_EXPORT WebTouchEvent TransformWebTouchEvent(Widget*, const WebTouchEvent&); | 95 WEB_EXPORT WebTouchEvent TransformWebTouchEvent(Widget*, const WebTouchEvent&); |
97 | 96 |
98 Vector<WebMouseEvent> WEB_EXPORT | 97 Vector<WebMouseEvent> WEB_EXPORT |
99 TransformWebMouseEventVector(Widget*, const std::vector<const WebInputEvent*>&); | 98 TransformWebMouseEventVector(Widget*, const std::vector<const WebInputEvent*>&); |
100 Vector<WebTouchEvent> WEB_EXPORT | 99 Vector<WebTouchEvent> WEB_EXPORT |
101 TransformWebTouchEventVector(Widget*, const std::vector<const WebInputEvent*>&); | 100 TransformWebTouchEventVector(Widget*, const std::vector<const WebInputEvent*>&); |
102 | 101 |
103 } // namespace blink | 102 } // namespace blink |
104 | 103 |
105 #endif | 104 #endif |
OLD | NEW |