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

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

Issue 2290313002: Remove PlatformKeyboardEvent (Closed)
Patch Set: One more fix Created 4 years, 3 months 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 14 matching lines...) Expand all
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" 34 #include "platform/PlatformGestureEvent.h"
35 #include "platform/PlatformKeyboardEvent.h"
36 #include "platform/PlatformMouseEvent.h" 35 #include "platform/PlatformMouseEvent.h"
37 #include "platform/PlatformTouchEvent.h" 36 #include "platform/PlatformTouchEvent.h"
38 #include "platform/PlatformWheelEvent.h" 37 #include "platform/PlatformWheelEvent.h"
39 #include "public/web/WebInputEvent.h" 38 #include "public/web/WebInputEvent.h"
40 #include "web/WebExport.h" 39 #include "web/WebExport.h"
41 #include "wtf/Compiler.h" 40 #include "wtf/Compiler.h"
42 41
43 namespace blink { 42 namespace blink {
44 43
45 class GestureEvent; 44 class GestureEvent;
(...skipping 20 matching lines...) Expand all
66 class WEB_EXPORT PlatformWheelEventBuilder : WTF_NON_EXPORTED_BASE(public Platfo rmWheelEvent) { 65 class WEB_EXPORT PlatformWheelEventBuilder : WTF_NON_EXPORTED_BASE(public Platfo rmWheelEvent) {
67 public: 66 public:
68 PlatformWheelEventBuilder(Widget*, const WebMouseWheelEvent&); 67 PlatformWheelEventBuilder(Widget*, const WebMouseWheelEvent&);
69 }; 68 };
70 69
71 class WEB_EXPORT PlatformGestureEventBuilder : WTF_NON_EXPORTED_BASE(public Plat formGestureEvent) { 70 class WEB_EXPORT PlatformGestureEventBuilder : WTF_NON_EXPORTED_BASE(public Plat formGestureEvent) {
72 public: 71 public:
73 PlatformGestureEventBuilder(Widget*, const WebGestureEvent&); 72 PlatformGestureEventBuilder(Widget*, const WebGestureEvent&);
74 }; 73 };
75 74
76 class WEB_EXPORT PlatformKeyboardEventBuilder : WTF_NON_EXPORTED_BASE(public Pla tformKeyboardEvent) {
77 public:
78 PlatformKeyboardEventBuilder(const WebKeyboardEvent&);
79 void setKeyType(EventType);
80 bool isCharacterKey() const;
81 };
82
83 // Converts a WebTouchPoint to a PlatformTouchPoint. 75 // Converts a WebTouchPoint to a PlatformTouchPoint.
84 class WEB_EXPORT PlatformTouchPointBuilder : WTF_NON_EXPORTED_BASE(public Platfo rmTouchPoint) { 76 class WEB_EXPORT PlatformTouchPointBuilder : WTF_NON_EXPORTED_BASE(public Platfo rmTouchPoint) {
85 public: 77 public:
86 PlatformTouchPointBuilder(Widget*, const WebTouchPoint&); 78 PlatformTouchPointBuilder(Widget*, const WebTouchPoint&);
87 }; 79 };
88 80
89 // Converts a WebTouchEvent to a PlatformTouchEvent. 81 // Converts a WebTouchEvent to a PlatformTouchEvent.
90 class WEB_EXPORT PlatformTouchEventBuilder : WTF_NON_EXPORTED_BASE(public Platfo rmTouchEvent) { 82 class WEB_EXPORT PlatformTouchEventBuilder : WTF_NON_EXPORTED_BASE(public Platfo rmTouchEvent) {
91 public: 83 public:
92 PlatformTouchEventBuilder(Widget*, const WebTouchEvent&); 84 PlatformTouchEventBuilder(Widget*, const WebTouchEvent&);
93 }; 85 };
94 86
95 class WEB_EXPORT WebMouseEventBuilder : WTF_NON_EXPORTED_BASE(public WebMouseEve nt) { 87 class WEB_EXPORT WebMouseEventBuilder : WTF_NON_EXPORTED_BASE(public WebMouseEve nt) {
96 public: 88 public:
97 // Converts a MouseEvent to a corresponding WebMouseEvent. 89 // Converts a MouseEvent to a corresponding WebMouseEvent.
98 // NOTE: This is only implemented for mousemove, mouseover, mouseout, 90 // NOTE: This is only implemented for mousemove, mouseover, mouseout,
99 // mousedown and mouseup. If the event mapping fails, the event type will 91 // mousedown and mouseup. If the event mapping fails, the event type will
100 // be set to Undefined. 92 // be set to Undefined.
101 WebMouseEventBuilder(const Widget*, const LayoutItem, const MouseEvent&); 93 WebMouseEventBuilder(const Widget*, const LayoutItem, const MouseEvent&);
102 WebMouseEventBuilder(const Widget*, const LayoutItem, const TouchEvent&); 94 WebMouseEventBuilder(const Widget*, const LayoutItem, const TouchEvent&);
103 }; 95 };
104 96
105 // Converts a WheelEvent to a corresponding WebMouseWheelEvent. 97 // Converts a WheelEvent to a corresponding WebMouseWheelEvent.
106 // If the event mapping fails, the event type will be set to Undefined. 98 // If the event mapping fails, the event type will be set to Undefined.
107 class WEB_EXPORT WebMouseWheelEventBuilder : WTF_NON_EXPORTED_BASE(public WebMou seWheelEvent) { 99 class WEB_EXPORT WebMouseWheelEventBuilder : WTF_NON_EXPORTED_BASE(public WebMou seWheelEvent) {
108 public: 100 public:
109 WebMouseWheelEventBuilder(const Widget*, const LayoutItem, const WheelEvent& ); 101 WebMouseWheelEventBuilder(const Widget*, const LayoutItem, const WheelEvent& );
110 }; 102 };
111 103
112 // Converts a KeyboardEvent or PlatformKeyboardEvent to a 104 // Converts a KeyboardEvent to a corresponding WebKeyboardEvent.
113 // corresponding WebKeyboardEvent.
114 // NOTE: For KeyboardEvent, this is only implemented for keydown, 105 // NOTE: For KeyboardEvent, this is only implemented for keydown,
115 // keyup, and keypress. If the event mapping fails, the event type will be set 106 // keyup, and keypress. If the event mapping fails, the event type will be set
116 // to Undefined. 107 // to Undefined.
117 class WEB_EXPORT WebKeyboardEventBuilder : WTF_NON_EXPORTED_BASE(public WebKeybo ardEvent) { 108 class WEB_EXPORT WebKeyboardEventBuilder : WTF_NON_EXPORTED_BASE(public WebKeybo ardEvent) {
118 public: 109 public:
119 WebKeyboardEventBuilder(const KeyboardEvent&); 110 WebKeyboardEventBuilder(const KeyboardEvent&);
120 }; 111 };
121 112
122 // Converts a TouchEvent to a corresponding WebTouchEvent. 113 // Converts a TouchEvent to a corresponding WebTouchEvent.
123 // NOTE: WebTouchEvents have a cap on the number of WebTouchPoints. Any points 114 // NOTE: WebTouchEvents have a cap on the number of WebTouchPoints. Any points
124 // exceeding that cap will be dropped. 115 // exceeding that cap will be dropped.
125 class WEB_EXPORT WebTouchEventBuilder : WTF_NON_EXPORTED_BASE(public WebTouchEve nt) { 116 class WEB_EXPORT WebTouchEventBuilder : WTF_NON_EXPORTED_BASE(public WebTouchEve nt) {
126 public: 117 public:
127 WebTouchEventBuilder(const LayoutItem, const TouchEvent&); 118 WebTouchEventBuilder(const LayoutItem, const TouchEvent&);
128 }; 119 };
129 120
130 // Converts GestureEvent to a corresponding WebGestureEvent. 121 // Converts GestureEvent to a corresponding WebGestureEvent.
131 // NOTE: If event mapping fails, the type will be set to Undefined. 122 // NOTE: If event mapping fails, the type will be set to Undefined.
132 class WEB_EXPORT WebGestureEventBuilder : WTF_NON_EXPORTED_BASE(public WebGestur eEvent) { 123 class WEB_EXPORT WebGestureEventBuilder : WTF_NON_EXPORTED_BASE(public WebGestur eEvent) {
133 public: 124 public:
134 WebGestureEventBuilder(const LayoutItem, const GestureEvent&); 125 WebGestureEventBuilder(const LayoutItem, const GestureEvent&);
135 }; 126 };
136 127
137 } // namespace blink 128 } // namespace blink
138 129
139 #endif 130 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698