| 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 "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/events/TouchEvent.h" | 8 #include "core/events/TouchEvent.h" |
| 9 #include "core/frame/Deprecation.h" | 9 #include "core/frame/Deprecation.h" |
| 10 #include "core/frame/EventHandlerRegistry.h" | 10 #include "core/frame/EventHandlerRegistry.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // instance represents. | 77 // instance represents. |
| 78 Member<TouchList> m_touches; | 78 Member<TouchList> m_touches; |
| 79 | 79 |
| 80 using EventTargetSet = HeapHashSet<Member<EventTarget>>; | 80 using EventTargetSet = HeapHashSet<Member<EventTarget>>; |
| 81 // Set of targets involved in m_touches. | 81 // Set of targets involved in m_touches. |
| 82 EventTargetSet m_targets; | 82 EventTargetSet m_targets; |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace | 85 } // namespace |
| 86 | 86 |
| 87 TouchEventManager::TouchEventManager(LocalFrame* frame) : m_frame(frame) { | 87 TouchEventManager::TouchEventManager(LocalFrame& frame) : m_frame(frame) { |
| 88 clear(); | 88 clear(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 void TouchEventManager::clear() { | 91 void TouchEventManager::clear() { |
| 92 m_touchSequenceDocument.clear(); | 92 m_touchSequenceDocument.clear(); |
| 93 m_targetForTouchID.clear(); | 93 m_targetForTouchID.clear(); |
| 94 m_regionForTouchID.clear(); | 94 m_regionForTouchID.clear(); |
| 95 m_touchPressed = false; | 95 m_touchPressed = false; |
| 96 m_currentEvent = PlatformEvent::NoType; | 96 m_currentEvent = PlatformEvent::NoType; |
| 97 m_currentTouchAction = TouchActionAuto; | 97 m_currentTouchAction = TouchActionAuto; |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 } | 499 } |
| 500 | 500 |
| 501 return dispatchTouchEvents(event, touchInfos, allTouchesReleased); | 501 return dispatchTouchEvents(event, touchInfos, allTouchesReleased); |
| 502 } | 502 } |
| 503 | 503 |
| 504 bool TouchEventManager::isAnyTouchActive() const { | 504 bool TouchEventManager::isAnyTouchActive() const { |
| 505 return m_touchPressed; | 505 return m_touchPressed; |
| 506 } | 506 } |
| 507 | 507 |
| 508 } // namespace blink | 508 } // namespace blink |
| OLD | NEW |