Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: third_party/WebKit/Source/web/WebInputEventConversion.h

Issue 2539283002: Remove PlatformGestureEvent in favour of using WebGestureEvent (Closed)
Patch Set: Add missing copyright on new file Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 "platform/PlatformGestureEvent.h"
35 #include "platform/PlatformMouseEvent.h" 34 #include "platform/PlatformMouseEvent.h"
36 #include "platform/PlatformTouchEvent.h" 35 #include "platform/PlatformTouchEvent.h"
37 #include "platform/PlatformWheelEvent.h" 36 #include "platform/PlatformWheelEvent.h"
38 #include "public/platform/WebGestureEvent.h" 37 #include "platform/scroll/ScrollTypes.h"
39 #include "public/platform/WebInputEvent.h" 38 #include "public/platform/WebInputEvent.h"
40 #include "web/WebExport.h" 39 #include "web/WebExport.h"
41 #include "wtf/Compiler.h" 40 #include "wtf/Compiler.h"
42 #include <vector> 41 #include <vector>
43 42
44 namespace blink { 43 namespace blink {
45 44
46 class GestureEvent;
47 class KeyboardEvent; 45 class KeyboardEvent;
48 class MouseEvent; 46 class MouseEvent;
49 class LayoutItem; 47 class LayoutItem;
50 class TouchEvent; 48 class TouchEvent;
49 class WebGestureEvent;
51 class WebMouseEvent; 50 class WebMouseEvent;
52 class WebMouseWheelEvent; 51 class WebMouseWheelEvent;
53 class WebKeyboardEvent; 52 class WebKeyboardEvent;
54 class WebTouchEvent; 53 class WebTouchEvent;
55 class WebGestureEvent;
56 class WheelEvent; 54 class WheelEvent;
57 class Widget; 55 class Widget;
58 56
59 // These classes are used to convert from WebInputEvent subclasses to 57 // These classes are used to convert from WebInputEvent subclasses to
60 // corresponding WebCore events. 58 // corresponding WebCore events.
61 59
62 class WEB_EXPORT PlatformMouseEventBuilder 60 class WEB_EXPORT PlatformMouseEventBuilder
63 : NON_EXPORTED_BASE(public PlatformMouseEvent) { 61 : NON_EXPORTED_BASE(public PlatformMouseEvent) {
64 public: 62 public:
65 PlatformMouseEventBuilder(Widget*, const WebMouseEvent&); 63 PlatformMouseEventBuilder(Widget*, const WebMouseEvent&);
66 }; 64 };
67 65
68 class WEB_EXPORT PlatformWheelEventBuilder 66 class WEB_EXPORT PlatformWheelEventBuilder
69 : NON_EXPORTED_BASE(public PlatformWheelEvent) { 67 : NON_EXPORTED_BASE(public PlatformWheelEvent) {
70 public: 68 public:
71 PlatformWheelEventBuilder(Widget*, const WebMouseWheelEvent&); 69 PlatformWheelEventBuilder(Widget*, const WebMouseWheelEvent&);
72 }; 70 };
73 71
74 class WEB_EXPORT PlatformGestureEventBuilder
75 : NON_EXPORTED_BASE(public PlatformGestureEvent) {
76 public:
77 PlatformGestureEventBuilder(Widget*, const WebGestureEvent&);
78 };
79
80 // Converts a WebTouchPoint to a PlatformTouchPoint. 72 // Converts a WebTouchPoint to a PlatformTouchPoint.
81 class WEB_EXPORT PlatformTouchPointBuilder 73 class WEB_EXPORT PlatformTouchPointBuilder
82 : NON_EXPORTED_BASE(public PlatformTouchPoint) { 74 : NON_EXPORTED_BASE(public PlatformTouchPoint) {
83 public: 75 public:
84 PlatformTouchPointBuilder(Widget*, const WebTouchPoint&); 76 PlatformTouchPointBuilder(Widget*, const WebTouchPoint&);
85 }; 77 };
86 78
87 // Converts a WebTouchEvent to a PlatformTouchEvent. 79 // Converts a WebTouchEvent to a PlatformTouchEvent.
88 class WEB_EXPORT PlatformTouchEventBuilder 80 class WEB_EXPORT PlatformTouchEventBuilder
89 : NON_EXPORTED_BASE(public PlatformTouchEvent) { 81 : NON_EXPORTED_BASE(public PlatformTouchEvent) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 114
123 // Converts a TouchEvent to a corresponding WebTouchEvent. 115 // Converts a TouchEvent to a corresponding WebTouchEvent.
124 // NOTE: WebTouchEvents have a cap on the number of WebTouchPoints. Any points 116 // NOTE: WebTouchEvents have a cap on the number of WebTouchPoints. Any points
125 // exceeding that cap will be dropped. 117 // exceeding that cap will be dropped.
126 class WEB_EXPORT WebTouchEventBuilder 118 class WEB_EXPORT WebTouchEventBuilder
127 : NON_EXPORTED_BASE(public WebTouchEvent) { 119 : NON_EXPORTED_BASE(public WebTouchEvent) {
128 public: 120 public:
129 WebTouchEventBuilder(const LayoutItem, const TouchEvent&); 121 WebTouchEventBuilder(const LayoutItem, const TouchEvent&);
130 }; 122 };
131 123
132 // Converts GestureEvent to a corresponding WebGestureEvent. 124 // Return a new transformed WebGestureEvent by applying the Widget's scale
133 // NOTE: If event mapping fails, the type will be set to Undefined. 125 // and translation.
134 class WEB_EXPORT WebGestureEventBuilder 126 WEB_EXPORT WebGestureEvent TransformWebGestureEvent(Widget*,
135 : NON_EXPORTED_BASE(public WebGestureEvent) { 127 const WebGestureEvent&);
136 public:
137 WebGestureEventBuilder(const LayoutItem, const GestureEvent&);
138 };
139 128
140 Vector<PlatformMouseEvent> WEB_EXPORT 129 Vector<PlatformMouseEvent> WEB_EXPORT
141 createPlatformMouseEventVector(Widget*, 130 createPlatformMouseEventVector(Widget*,
142 const std::vector<const WebInputEvent*>&); 131 const std::vector<const WebInputEvent*>&);
143 Vector<PlatformTouchEvent> WEB_EXPORT 132 Vector<PlatformTouchEvent> WEB_EXPORT
144 createPlatformTouchEventVector(Widget*, 133 createPlatformTouchEventVector(Widget*,
145 const std::vector<const WebInputEvent*>&); 134 const std::vector<const WebInputEvent*>&);
146 135
147 } // namespace blink 136 } // namespace blink
148 137
149 #endif 138 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebInputEvent.cpp ('k') | third_party/WebKit/Source/web/WebInputEventConversion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698