| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/common/input/web_input_event_traits.h" | 5 #include "content/common/input/web_input_event_traits.h" |
| 6 | 6 |
| 7 #include <bitset> | 7 #include <bitset> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 CASE_TYPE(GestureTwoFingerTap); | 406 CASE_TYPE(GestureTwoFingerTap); |
| 407 CASE_TYPE(GestureLongPress); | 407 CASE_TYPE(GestureLongPress); |
| 408 CASE_TYPE(GestureLongTap); | 408 CASE_TYPE(GestureLongTap); |
| 409 CASE_TYPE(GesturePinchBegin); | 409 CASE_TYPE(GesturePinchBegin); |
| 410 CASE_TYPE(GesturePinchEnd); | 410 CASE_TYPE(GesturePinchEnd); |
| 411 CASE_TYPE(GesturePinchUpdate); | 411 CASE_TYPE(GesturePinchUpdate); |
| 412 CASE_TYPE(TouchStart); | 412 CASE_TYPE(TouchStart); |
| 413 CASE_TYPE(TouchMove); | 413 CASE_TYPE(TouchMove); |
| 414 CASE_TYPE(TouchEnd); | 414 CASE_TYPE(TouchEnd); |
| 415 CASE_TYPE(TouchCancel); | 415 CASE_TYPE(TouchCancel); |
| 416 CASE_TYPE(TouchScrollStarted); |
| 416 default: | 417 default: |
| 417 // Must include default to let blink::WebInputEvent add new event types | 418 // Must include default to let blink::WebInputEvent add new event types |
| 418 // before they're added here. | 419 // before they're added here. |
| 419 DLOG(WARNING) << | 420 DLOG(WARNING) << |
| 420 "Unhandled WebInputEvent type in WebInputEventTraits::GetName.\n"; | 421 "Unhandled WebInputEvent type in WebInputEventTraits::GetName.\n"; |
| 421 break; | 422 break; |
| 422 } | 423 } |
| 423 #undef CASE_TYPE | 424 #undef CASE_TYPE |
| 424 return ""; | 425 return ""; |
| 425 } | 426 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 case WebInputEvent::ContextMenu: | 476 case WebInputEvent::ContextMenu: |
| 476 case WebInputEvent::GestureScrollBegin: | 477 case WebInputEvent::GestureScrollBegin: |
| 477 case WebInputEvent::GestureScrollEnd: | 478 case WebInputEvent::GestureScrollEnd: |
| 478 case WebInputEvent::GestureShowPress: | 479 case WebInputEvent::GestureShowPress: |
| 479 case WebInputEvent::GestureTapUnconfirmed: | 480 case WebInputEvent::GestureTapUnconfirmed: |
| 480 case WebInputEvent::GestureTapDown: | 481 case WebInputEvent::GestureTapDown: |
| 481 case WebInputEvent::GestureTapCancel: | 482 case WebInputEvent::GestureTapCancel: |
| 482 case WebInputEvent::GesturePinchBegin: | 483 case WebInputEvent::GesturePinchBegin: |
| 483 case WebInputEvent::GesturePinchEnd: | 484 case WebInputEvent::GesturePinchEnd: |
| 484 case WebInputEvent::TouchCancel: | 485 case WebInputEvent::TouchCancel: |
| 486 case WebInputEvent::TouchScrollStarted: |
| 485 return false; | 487 return false; |
| 486 case WebInputEvent::TouchStart: | 488 case WebInputEvent::TouchStart: |
| 487 case WebInputEvent::TouchEnd: | 489 case WebInputEvent::TouchEnd: |
| 488 return static_cast<const WebTouchEvent&>(event).cancelable; | 490 return static_cast<const WebTouchEvent&>(event).cancelable; |
| 489 default: | 491 default: |
| 490 return true; | 492 return true; |
| 491 } | 493 } |
| 492 } | 494 } |
| 493 | 495 |
| 494 uint32_t WebInputEventTraits::GetUniqueTouchEventId( | 496 uint32_t WebInputEventTraits::GetUniqueTouchEventId( |
| 495 const WebInputEvent& event) { | 497 const WebInputEvent& event) { |
| 496 if (WebInputEvent::isTouchEventType(event.type)) { | 498 if (WebInputEvent::isTouchEventType(event.type)) { |
| 497 return static_cast<const WebTouchEvent&>(event).uniqueTouchEventId; | 499 return static_cast<const WebTouchEvent&>(event).uniqueTouchEventId; |
| 498 } | 500 } |
| 499 return 0U; | 501 return 0U; |
| 500 } | 502 } |
| 501 | 503 |
| 502 } // namespace content | 504 } // namespace content |
| OLD | NEW |