| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 WebInputEventResult PageWidgetEventHandler::handleMouseWheel(LocalFrame& mainFra
me, const WebMouseWheelEvent& event) | 224 WebInputEventResult PageWidgetEventHandler::handleMouseWheel(LocalFrame& mainFra
me, const WebMouseWheelEvent& event) |
| 225 { | 225 { |
| 226 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m
ainFrame.view(), event)); | 226 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m
ainFrame.view(), event)); |
| 227 } | 227 } |
| 228 | 228 |
| 229 WebInputEventResult PageWidgetEventHandler::handleTouchEvent(LocalFrame& mainFra
me, const WebTouchEvent& event) | 229 WebInputEventResult PageWidgetEventHandler::handleTouchEvent(LocalFrame& mainFra
me, const WebTouchEvent& event) |
| 230 { | 230 { |
| 231 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m
ainFrame.view(), event)); | 231 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m
ainFrame.view(), event)); |
| 232 } | 232 } |
| 233 | 233 |
| 234 #define WEBINPUT_EVENT_CASE(type) case WebInputEvent::type: return #type; | |
| 235 | |
| 236 const char* PageWidgetEventHandler::inputTypeToName(WebInputEvent::Type type) | |
| 237 { | |
| 238 switch (type) { | |
| 239 WEBINPUT_EVENT_CASE(MouseDown) | |
| 240 WEBINPUT_EVENT_CASE(MouseUp) | |
| 241 WEBINPUT_EVENT_CASE(MouseMove) | |
| 242 WEBINPUT_EVENT_CASE(MouseEnter) | |
| 243 WEBINPUT_EVENT_CASE(MouseLeave) | |
| 244 WEBINPUT_EVENT_CASE(ContextMenu) | |
| 245 WEBINPUT_EVENT_CASE(MouseWheel) | |
| 246 WEBINPUT_EVENT_CASE(RawKeyDown) | |
| 247 WEBINPUT_EVENT_CASE(KeyDown) | |
| 248 WEBINPUT_EVENT_CASE(KeyUp) | |
| 249 WEBINPUT_EVENT_CASE(Char) | |
| 250 WEBINPUT_EVENT_CASE(GestureScrollBegin) | |
| 251 WEBINPUT_EVENT_CASE(GestureScrollEnd) | |
| 252 WEBINPUT_EVENT_CASE(GestureScrollUpdate) | |
| 253 WEBINPUT_EVENT_CASE(GestureFlingStart) | |
| 254 WEBINPUT_EVENT_CASE(GestureFlingCancel) | |
| 255 WEBINPUT_EVENT_CASE(GestureShowPress) | |
| 256 WEBINPUT_EVENT_CASE(GestureTap) | |
| 257 WEBINPUT_EVENT_CASE(GestureTapUnconfirmed) | |
| 258 WEBINPUT_EVENT_CASE(GestureTapDown) | |
| 259 WEBINPUT_EVENT_CASE(GestureTapCancel) | |
| 260 WEBINPUT_EVENT_CASE(GestureDoubleTap) | |
| 261 WEBINPUT_EVENT_CASE(GestureTwoFingerTap) | |
| 262 WEBINPUT_EVENT_CASE(GestureLongPress) | |
| 263 WEBINPUT_EVENT_CASE(GestureLongTap) | |
| 264 WEBINPUT_EVENT_CASE(GesturePinchBegin) | |
| 265 WEBINPUT_EVENT_CASE(GesturePinchEnd) | |
| 266 WEBINPUT_EVENT_CASE(GesturePinchUpdate) | |
| 267 WEBINPUT_EVENT_CASE(TouchStart) | |
| 268 WEBINPUT_EVENT_CASE(TouchMove) | |
| 269 WEBINPUT_EVENT_CASE(TouchEnd) | |
| 270 WEBINPUT_EVENT_CASE(TouchCancel) | |
| 271 WEBINPUT_EVENT_CASE(TouchScrollStarted) | |
| 272 default: | |
| 273 NOTREACHED(); | |
| 274 return ""; | |
| 275 } | |
| 276 } | |
| 277 | |
| 278 } // namespace blink | 234 } // namespace blink |
| OLD | NEW |