OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "core/input/TouchEventManager.h" | 5 #include "core/input/TouchEventManager.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
9 #include "core/events/TouchEvent.h" | 9 #include "core/events/TouchEvent.h" |
10 #include "core/frame/Deprecation.h" | 10 #include "core/frame/Deprecation.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 return EventTypeNames::touchend; | 43 return EventTypeNames::touchend; |
44 case WebTouchPoint::kStateCancelled: | 44 case WebTouchPoint::kStateCancelled: |
45 return EventTypeNames::touchcancel; | 45 return EventTypeNames::touchcancel; |
46 case WebTouchPoint::kStatePressed: | 46 case WebTouchPoint::kStatePressed: |
47 return EventTypeNames::touchstart; | 47 return EventTypeNames::touchstart; |
48 case WebTouchPoint::kStateMoved: | 48 case WebTouchPoint::kStateMoved: |
49 return EventTypeNames::touchmove; | 49 return EventTypeNames::touchmove; |
50 case WebTouchPoint::kStateStationary: | 50 case WebTouchPoint::kStateStationary: |
51 // Fall through to default | 51 // Fall through to default |
52 default: | 52 default: |
53 ASSERT_NOT_REACHED(); | 53 NOTREACHED(); |
54 return g_empty_atom; | 54 return g_empty_atom; |
55 } | 55 } |
56 } | 56 } |
57 | 57 |
58 enum TouchEventDispatchResultType { | 58 enum TouchEventDispatchResultType { |
59 kUnhandledTouches, // Unhandled touch events. | 59 kUnhandledTouches, // Unhandled touch events. |
60 kHandledTouches, // Handled touch events. | 60 kHandledTouches, // Handled touch events. |
61 kTouchEventDispatchResultTypeMax, | 61 kTouchEventDispatchResultTypeMax, |
62 }; | 62 }; |
63 | 63 |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 } | 518 } |
519 | 519 |
520 return DispatchTouchEvents(event, touch_infos, all_touches_released); | 520 return DispatchTouchEvents(event, touch_infos, all_touches_released); |
521 } | 521 } |
522 | 522 |
523 bool TouchEventManager::IsAnyTouchActive() const { | 523 bool TouchEventManager::IsAnyTouchActive() const { |
524 return touch_pressed_; | 524 return touch_pressed_; |
525 } | 525 } |
526 | 526 |
527 } // namespace blink | 527 } // namespace blink |
OLD | NEW |