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) | |
163 case WebInputEvent::TouchStart: | 162 case WebInputEvent::TouchStart: |
164 case WebInputEvent::TouchMove: | 163 case WebInputEvent::TouchMove: |
165 case WebInputEvent::TouchEnd: | 164 case WebInputEvent::TouchEnd: |
166 case WebInputEvent::TouchCancel: | 165 case WebInputEvent::TouchCancel: |
167 if (!frame || !frame->view()) | 166 if (!frame || !frame->view()) |
168 return false; | 167 return false; |
169 return handler.handleTouchEvent(*frame, *static_cast<const WebTouchEvent
*>(&event)); | 168 return handler.handleTouchEvent(*frame, *static_cast<const WebTouchEvent
*>(&event)); |
170 #endif | |
171 | 169 |
172 case WebInputEvent::GesturePinchBegin: | 170 case WebInputEvent::GesturePinchBegin: |
173 case WebInputEvent::GesturePinchEnd: | 171 case WebInputEvent::GesturePinchEnd: |
174 case WebInputEvent::GesturePinchUpdate: | 172 case WebInputEvent::GesturePinchUpdate: |
175 // FIXME: Once PlatformGestureEvent is updated to support pinch, this | 173 // FIXME: Once PlatformGestureEvent is updated to support pinch, this |
176 // should call handleGestureEvent, just like it currently does for | 174 // should call handleGestureEvent, just like it currently does for |
177 // gesture scroll. | 175 // gesture scroll. |
178 return false; | 176 return false; |
179 | 177 |
180 default: | 178 default: |
(...skipping 25 matching lines...) Expand all Loading... |
206 void PageWidgetEventHandler::handleMouseUp(Frame& mainFrame, const WebMouseEvent
& event) | 204 void PageWidgetEventHandler::handleMouseUp(Frame& mainFrame, const WebMouseEvent
& event) |
207 { | 205 { |
208 mainFrame.eventHandler()->handleMouseReleaseEvent(PlatformMouseEventBuilder(
mainFrame.view(), event)); | 206 mainFrame.eventHandler()->handleMouseReleaseEvent(PlatformMouseEventBuilder(
mainFrame.view(), event)); |
209 } | 207 } |
210 | 208 |
211 bool PageWidgetEventHandler::handleMouseWheel(Frame& mainFrame, const WebMouseWh
eelEvent& event) | 209 bool PageWidgetEventHandler::handleMouseWheel(Frame& mainFrame, const WebMouseWh
eelEvent& event) |
212 { | 210 { |
213 return mainFrame.eventHandler()->handleWheelEvent(PlatformWheelEventBuilder(
mainFrame.view(), event)); | 211 return mainFrame.eventHandler()->handleWheelEvent(PlatformWheelEventBuilder(
mainFrame.view(), event)); |
214 } | 212 } |
215 | 213 |
216 #if ENABLE(TOUCH_EVENTS) | |
217 bool PageWidgetEventHandler::handleTouchEvent(Frame& mainFrame, const WebTouchEv
ent& event) | 214 bool PageWidgetEventHandler::handleTouchEvent(Frame& mainFrame, const WebTouchEv
ent& event) |
218 { | 215 { |
219 return mainFrame.eventHandler()->handleTouchEvent(PlatformTouchEventBuilder(
mainFrame.view(), event)); | 216 return mainFrame.eventHandler()->handleTouchEvent(PlatformTouchEventBuilder(
mainFrame.view(), event)); |
220 } | 217 } |
221 #endif | |
222 | 218 |
223 } | 219 } |
OLD | NEW |