OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 case WebInputEvent::GestureFlingCancel: | 152 case WebInputEvent::GestureFlingCancel: |
153 case WebInputEvent::GestureTap: | 153 case WebInputEvent::GestureTap: |
154 case WebInputEvent::GestureTapDown: | 154 case WebInputEvent::GestureTapDown: |
155 case WebInputEvent::GestureTapCancel: | 155 case WebInputEvent::GestureTapCancel: |
156 case WebInputEvent::GestureDoubleTap: | 156 case WebInputEvent::GestureDoubleTap: |
157 case WebInputEvent::GestureTwoFingerTap: | 157 case WebInputEvent::GestureTwoFingerTap: |
158 case WebInputEvent::GestureLongPress: | 158 case WebInputEvent::GestureLongPress: |
159 case WebInputEvent::GestureLongTap: | 159 case WebInputEvent::GestureLongTap: |
160 return handler.handleGestureEvent(*static_cast<const WebGestureEvent*>(&
event)); | 160 return handler.handleGestureEvent(*static_cast<const WebGestureEvent*>(&
event)); |
161 | 161 |
| 162 #if ENABLE(TOUCH_EVENTS) |
162 case WebInputEvent::TouchStart: | 163 case WebInputEvent::TouchStart: |
163 case WebInputEvent::TouchMove: | 164 case WebInputEvent::TouchMove: |
164 case WebInputEvent::TouchEnd: | 165 case WebInputEvent::TouchEnd: |
165 case WebInputEvent::TouchCancel: | 166 case WebInputEvent::TouchCancel: |
166 if (!frame || !frame->view()) | 167 if (!frame || !frame->view()) |
167 return false; | 168 return false; |
168 return handler.handleTouchEvent(*frame, *static_cast<const WebTouchEvent
*>(&event)); | 169 return handler.handleTouchEvent(*frame, *static_cast<const WebTouchEvent
*>(&event)); |
| 170 #endif |
169 | 171 |
170 case WebInputEvent::GesturePinchBegin: | 172 case WebInputEvent::GesturePinchBegin: |
171 case WebInputEvent::GesturePinchEnd: | 173 case WebInputEvent::GesturePinchEnd: |
172 case WebInputEvent::GesturePinchUpdate: | 174 case WebInputEvent::GesturePinchUpdate: |
173 // FIXME: Once PlatformGestureEvent is updated to support pinch, this | 175 // FIXME: Once PlatformGestureEvent is updated to support pinch, this |
174 // should call handleGestureEvent, just like it currently does for | 176 // should call handleGestureEvent, just like it currently does for |
175 // gesture scroll. | 177 // gesture scroll. |
176 return false; | 178 return false; |
177 | 179 |
178 default: | 180 default: |
(...skipping 25 matching lines...) Expand all Loading... |
204 void PageWidgetEventHandler::handleMouseUp(Frame& mainFrame, const WebMouseEvent
& event) | 206 void PageWidgetEventHandler::handleMouseUp(Frame& mainFrame, const WebMouseEvent
& event) |
205 { | 207 { |
206 mainFrame.eventHandler()->handleMouseReleaseEvent(PlatformMouseEventBuilder(
mainFrame.view(), event)); | 208 mainFrame.eventHandler()->handleMouseReleaseEvent(PlatformMouseEventBuilder(
mainFrame.view(), event)); |
207 } | 209 } |
208 | 210 |
209 bool PageWidgetEventHandler::handleMouseWheel(Frame& mainFrame, const WebMouseWh
eelEvent& event) | 211 bool PageWidgetEventHandler::handleMouseWheel(Frame& mainFrame, const WebMouseWh
eelEvent& event) |
210 { | 212 { |
211 return mainFrame.eventHandler()->handleWheelEvent(PlatformWheelEventBuilder(
mainFrame.view(), event)); | 213 return mainFrame.eventHandler()->handleWheelEvent(PlatformWheelEventBuilder(
mainFrame.view(), event)); |
212 } | 214 } |
213 | 215 |
| 216 #if ENABLE(TOUCH_EVENTS) |
214 bool PageWidgetEventHandler::handleTouchEvent(Frame& mainFrame, const WebTouchEv
ent& event) | 217 bool PageWidgetEventHandler::handleTouchEvent(Frame& mainFrame, const WebTouchEv
ent& event) |
215 { | 218 { |
216 return mainFrame.eventHandler()->handleTouchEvent(PlatformTouchEventBuilder(
mainFrame.view(), event)); | 219 return mainFrame.eventHandler()->handleTouchEvent(PlatformTouchEventBuilder(
mainFrame.view(), event)); |
217 } | 220 } |
| 221 #endif |
218 | 222 |
219 } | 223 } |
OLD | NEW |