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

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

Issue 1756343002: Revert of Extract webkit_unit_tests from blink_web component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 19 matching lines...) Expand all
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" 35 #include "platform/PlatformKeyboardEvent.h"
36 #include "platform/PlatformMouseEvent.h" 36 #include "platform/PlatformMouseEvent.h"
37 #include "platform/PlatformTouchEvent.h" 37 #include "platform/PlatformTouchEvent.h"
38 #include "platform/PlatformWheelEvent.h" 38 #include "platform/PlatformWheelEvent.h"
39 #include "public/web/WebInputEvent.h" 39 #include "public/web/WebInputEvent.h"
40 #include "web/WebExport.h"
41 #include "wtf/Compiler.h"
42 40
43 namespace blink { 41 namespace blink {
44 42
45 class GestureEvent; 43 class GestureEvent;
46 class KeyboardEvent; 44 class KeyboardEvent;
47 class MouseEvent; 45 class MouseEvent;
48 class LayoutObject; 46 class LayoutObject;
49 class TouchEvent; 47 class TouchEvent;
50 class WebMouseEvent; 48 class WebMouseEvent;
51 class WebMouseWheelEvent; 49 class WebMouseWheelEvent;
52 class WebKeyboardEvent; 50 class WebKeyboardEvent;
53 class WebTouchEvent; 51 class WebTouchEvent;
54 class WebGestureEvent; 52 class WebGestureEvent;
55 class WheelEvent; 53 class WheelEvent;
56 class Widget; 54 class Widget;
57 55
58 // These classes are used to convert from WebInputEvent subclasses to 56 // These classes are used to convert from WebInputEvent subclasses to
59 // corresponding WebCore events. 57 // corresponding WebCore events.
60 58
61 class WEB_EXPORT PlatformMouseEventBuilder : WTF_NON_EXPORTED_BASE(public Platfo rmMouseEvent) { 59 class PlatformMouseEventBuilder : public PlatformMouseEvent {
62 public: 60 public:
63 PlatformMouseEventBuilder(Widget*, const WebMouseEvent&); 61 PlatformMouseEventBuilder(Widget*, const WebMouseEvent&);
64 }; 62 };
65 63
66 class WEB_EXPORT PlatformWheelEventBuilder : WTF_NON_EXPORTED_BASE(public Platfo rmWheelEvent) { 64 class PlatformWheelEventBuilder : public PlatformWheelEvent {
67 public: 65 public:
68 PlatformWheelEventBuilder(Widget*, const WebMouseWheelEvent&); 66 PlatformWheelEventBuilder(Widget*, const WebMouseWheelEvent&);
69 }; 67 };
70 68
71 class WEB_EXPORT PlatformGestureEventBuilder : WTF_NON_EXPORTED_BASE(public Plat formGestureEvent) { 69 class PlatformGestureEventBuilder : public PlatformGestureEvent {
72 public: 70 public:
73 PlatformGestureEventBuilder(Widget*, const WebGestureEvent&); 71 PlatformGestureEventBuilder(Widget*, const WebGestureEvent&);
74 }; 72 };
75 73
76 class WEB_EXPORT PlatformKeyboardEventBuilder : WTF_NON_EXPORTED_BASE(public Pla tformKeyboardEvent) { 74 class PlatformKeyboardEventBuilder : public PlatformKeyboardEvent {
77 public: 75 public:
78 PlatformKeyboardEventBuilder(const WebKeyboardEvent&); 76 PlatformKeyboardEventBuilder(const WebKeyboardEvent&);
79 void setKeyType(Type); 77 void setKeyType(Type);
80 bool isCharacterKey() const; 78 bool isCharacterKey() const;
81 }; 79 };
82 80
83 // Converts a WebTouchPoint to a PlatformTouchPoint. 81 // Converts a WebTouchPoint to a PlatformTouchPoint.
84 class WEB_EXPORT PlatformTouchPointBuilder : WTF_NON_EXPORTED_BASE(public Platfo rmTouchPoint) { 82 class PlatformTouchPointBuilder : public PlatformTouchPoint {
85 public: 83 public:
86 PlatformTouchPointBuilder(Widget*, const WebTouchPoint&); 84 PlatformTouchPointBuilder(Widget*, const WebTouchPoint&);
87 }; 85 };
88 86
89 // Converts a WebTouchEvent to a PlatformTouchEvent. 87 // Converts a WebTouchEvent to a PlatformTouchEvent.
90 class WEB_EXPORT PlatformTouchEventBuilder : WTF_NON_EXPORTED_BASE(public Platfo rmTouchEvent) { 88 class PlatformTouchEventBuilder : public PlatformTouchEvent {
91 public: 89 public:
92 PlatformTouchEventBuilder(Widget*, const WebTouchEvent&); 90 PlatformTouchEventBuilder(Widget*, const WebTouchEvent&);
93 }; 91 };
94 92
95 class WEB_EXPORT WebMouseEventBuilder : WTF_NON_EXPORTED_BASE(public WebMouseEve nt) { 93 class WebMouseEventBuilder : public WebMouseEvent {
96 public: 94 public:
97 // Converts a MouseEvent to a corresponding WebMouseEvent. 95 // Converts a MouseEvent to a corresponding WebMouseEvent.
98 // NOTE: This is only implemented for mousemove, mouseover, mouseout, 96 // NOTE: This is only implemented for mousemove, mouseover, mouseout,
99 // mousedown and mouseup. If the event mapping fails, the event type will 97 // mousedown and mouseup. If the event mapping fails, the event type will
100 // be set to Undefined. 98 // be set to Undefined.
101 WebMouseEventBuilder(const Widget*, const LayoutObject*, const MouseEvent&); 99 WebMouseEventBuilder(const Widget*, const LayoutObject*, const MouseEvent&);
102 WebMouseEventBuilder(const Widget*, const LayoutObject*, const TouchEvent&); 100 WebMouseEventBuilder(const Widget*, const LayoutObject*, const TouchEvent&);
103 }; 101 };
104 102
105 // Converts a WheelEvent to a corresponding WebMouseWheelEvent. 103 // Converts a WheelEvent to a corresponding WebMouseWheelEvent.
106 // If the event mapping fails, the event type will be set to Undefined. 104 // 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) { 105 class WebMouseWheelEventBuilder : public WebMouseWheelEvent {
108 public: 106 public:
109 WebMouseWheelEventBuilder(const Widget*, const LayoutObject*, const WheelEve nt&); 107 WebMouseWheelEventBuilder(const Widget*, const LayoutObject*, const WheelEve nt&);
110 }; 108 };
111 109
112 // Converts a KeyboardEvent or PlatformKeyboardEvent to a 110 // Converts a KeyboardEvent or PlatformKeyboardEvent to a
113 // corresponding WebKeyboardEvent. 111 // corresponding WebKeyboardEvent.
114 // NOTE: For KeyboardEvent, this is only implemented for keydown, 112 // NOTE: For KeyboardEvent, this is only implemented for keydown,
115 // keyup, and keypress. If the event mapping fails, the event type will be set 113 // keyup, and keypress. If the event mapping fails, the event type will be set
116 // to Undefined. 114 // to Undefined.
117 class WEB_EXPORT WebKeyboardEventBuilder : WTF_NON_EXPORTED_BASE(public WebKeybo ardEvent) { 115 class WebKeyboardEventBuilder : public WebKeyboardEvent {
118 public: 116 public:
119 WebKeyboardEventBuilder(const KeyboardEvent&); 117 WebKeyboardEventBuilder(const KeyboardEvent&);
120 }; 118 };
121 119
122 // Converts a TouchEvent to a corresponding WebTouchEvent. 120 // Converts a TouchEvent to a corresponding WebTouchEvent.
123 // NOTE: WebTouchEvents have a cap on the number of WebTouchPoints. Any points 121 // NOTE: WebTouchEvents have a cap on the number of WebTouchPoints. Any points
124 // exceeding that cap will be dropped. 122 // exceeding that cap will be dropped.
125 class WEB_EXPORT WebTouchEventBuilder : WTF_NON_EXPORTED_BASE(public WebTouchEve nt) { 123 class WebTouchEventBuilder : public WebTouchEvent {
126 public: 124 public:
127 WebTouchEventBuilder(const LayoutObject*, const TouchEvent&); 125 WebTouchEventBuilder(const LayoutObject*, const TouchEvent&);
128 }; 126 };
129 127
130 // Converts GestureEvent to a corresponding WebGestureEvent. 128 // Converts GestureEvent to a corresponding WebGestureEvent.
131 // NOTE: If event mapping fails, the type will be set to Undefined. 129 // NOTE: If event mapping fails, the type will be set to Undefined.
132 class WEB_EXPORT WebGestureEventBuilder : WTF_NON_EXPORTED_BASE(public WebGestur eEvent) { 130 class WebGestureEventBuilder : public WebGestureEvent {
133 public: 131 public:
134 WebGestureEventBuilder(const LayoutObject*, const GestureEvent&); 132 WebGestureEventBuilder(const LayoutObject*, const GestureEvent&);
135 }; 133 };
136 134
137 } // namespace blink 135 } // namespace blink
138 136
139 #endif 137 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebFrameImplBase.h ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698