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 25 matching lines...) Expand all Loading... |
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 | 40 |
41 namespace blink { | 41 namespace blink { |
42 | 42 |
43 class GestureEvent; | 43 class GestureEvent; |
44 class KeyboardEvent; | 44 class KeyboardEvent; |
45 class MouseEvent; | 45 class MouseEvent; |
46 class RenderObject; | 46 class LayoutObject; |
47 class TouchEvent; | 47 class TouchEvent; |
48 class WebMouseEvent; | 48 class WebMouseEvent; |
49 class WebMouseWheelEvent; | 49 class WebMouseWheelEvent; |
50 class WebKeyboardEvent; | 50 class WebKeyboardEvent; |
51 class WebTouchEvent; | 51 class WebTouchEvent; |
52 class WebGestureEvent; | 52 class WebGestureEvent; |
53 class WheelEvent; | 53 class WheelEvent; |
54 class Widget; | 54 class Widget; |
55 | 55 |
56 // These classes are used to convert from WebInputEvent subclasses to | 56 // These classes are used to convert from WebInputEvent subclasses to |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 public: | 89 public: |
90 PlatformTouchEventBuilder(Widget*, const WebTouchEvent&); | 90 PlatformTouchEventBuilder(Widget*, const WebTouchEvent&); |
91 }; | 91 }; |
92 | 92 |
93 class WebMouseEventBuilder : public WebMouseEvent { | 93 class WebMouseEventBuilder : public WebMouseEvent { |
94 public: | 94 public: |
95 // Converts a MouseEvent to a corresponding WebMouseEvent. | 95 // Converts a MouseEvent to a corresponding WebMouseEvent. |
96 // NOTE: This is only implemented for mousemove, mouseover, mouseout, | 96 // NOTE: This is only implemented for mousemove, mouseover, mouseout, |
97 // 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 |
98 // be set to Undefined. | 98 // be set to Undefined. |
99 WebMouseEventBuilder(const Widget*, const RenderObject*, const MouseEvent&); | 99 WebMouseEventBuilder(const Widget*, const LayoutObject*, const MouseEvent&); |
100 WebMouseEventBuilder(const Widget*, const RenderObject*, const TouchEvent&); | 100 WebMouseEventBuilder(const Widget*, const LayoutObject*, const TouchEvent&); |
101 | 101 |
102 // Converts a PlatformMouseEvent to a corresponding WebMouseEvent. | 102 // Converts a PlatformMouseEvent to a corresponding WebMouseEvent. |
103 // NOTE: This is only implemented for mousepressed, mousereleased, and | 103 // NOTE: This is only implemented for mousepressed, mousereleased, and |
104 // mousemoved. If the event mapping fails, the event type will be set to | 104 // mousemoved. If the event mapping fails, the event type will be set to |
105 // Undefined. | 105 // Undefined. |
106 WebMouseEventBuilder(const Widget*, const PlatformMouseEvent&); | 106 WebMouseEventBuilder(const Widget*, const PlatformMouseEvent&); |
107 }; | 107 }; |
108 | 108 |
109 // Converts a WheelEvent to a corresponding WebMouseWheelEvent. | 109 // Converts a WheelEvent to a corresponding WebMouseWheelEvent. |
110 // If the event mapping fails, the event type will be set to Undefined. | 110 // If the event mapping fails, the event type will be set to Undefined. |
111 class WebMouseWheelEventBuilder : public WebMouseWheelEvent { | 111 class WebMouseWheelEventBuilder : public WebMouseWheelEvent { |
112 public: | 112 public: |
113 WebMouseWheelEventBuilder(const Widget*, const RenderObject*, const WheelEve
nt&); | 113 WebMouseWheelEventBuilder(const Widget*, const LayoutObject*, const WheelEve
nt&); |
114 }; | 114 }; |
115 | 115 |
116 // Converts a KeyboardEvent or PlatformKeyboardEvent to a | 116 // Converts a KeyboardEvent or PlatformKeyboardEvent to a |
117 // corresponding WebKeyboardEvent. | 117 // corresponding WebKeyboardEvent. |
118 // NOTE: For KeyboardEvent, this is only implemented for keydown, | 118 // NOTE: For KeyboardEvent, this is only implemented for keydown, |
119 // keyup, and keypress. If the event mapping fails, the event type will be set | 119 // keyup, and keypress. If the event mapping fails, the event type will be set |
120 // to Undefined. | 120 // to Undefined. |
121 class WebKeyboardEventBuilder : public WebKeyboardEvent { | 121 class WebKeyboardEventBuilder : public WebKeyboardEvent { |
122 public: | 122 public: |
123 WebKeyboardEventBuilder(const KeyboardEvent&); | 123 WebKeyboardEventBuilder(const KeyboardEvent&); |
124 WebKeyboardEventBuilder(const PlatformKeyboardEvent&); | 124 WebKeyboardEventBuilder(const PlatformKeyboardEvent&); |
125 }; | 125 }; |
126 | 126 |
127 // Converts a TouchEvent to a corresponding WebTouchEvent. | 127 // Converts a TouchEvent to a corresponding WebTouchEvent. |
128 // NOTE: WebTouchEvents have a cap on the number of WebTouchPoints. Any points | 128 // NOTE: WebTouchEvents have a cap on the number of WebTouchPoints. Any points |
129 // exceeding that cap will be dropped. | 129 // exceeding that cap will be dropped. |
130 class WebTouchEventBuilder : public WebTouchEvent { | 130 class WebTouchEventBuilder : public WebTouchEvent { |
131 public: | 131 public: |
132 WebTouchEventBuilder(const Widget*, const RenderObject*, const TouchEvent&); | 132 WebTouchEventBuilder(const Widget*, const LayoutObject*, const TouchEvent&); |
133 }; | 133 }; |
134 | 134 |
135 // Converts GestureEvent to a corresponding WebGestureEvent. | 135 // Converts GestureEvent to a corresponding WebGestureEvent. |
136 // NOTE: If event mapping fails, the type will be set to Undefined. | 136 // NOTE: If event mapping fails, the type will be set to Undefined. |
137 class WebGestureEventBuilder : public WebGestureEvent { | 137 class WebGestureEventBuilder : public WebGestureEvent { |
138 public: | 138 public: |
139 WebGestureEventBuilder(const Widget*, const RenderObject*, const GestureEven
t&); | 139 WebGestureEventBuilder(const Widget*, const LayoutObject*, const GestureEven
t&); |
140 }; | 140 }; |
141 | 141 |
142 } // namespace blink | 142 } // namespace blink |
143 | 143 |
144 #endif | 144 #endif |
OLD | NEW |