| 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 "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 8 #include "core/events/TouchEvent.h" | 9 #include "core/events/TouchEvent.h" |
| 9 #include "core/frame/Deprecation.h" | 10 #include "core/frame/Deprecation.h" |
| 10 #include "core/frame/EventHandlerRegistry.h" | 11 #include "core/frame/EventHandlerRegistry.h" |
| 11 #include "core/frame/FrameHost.h" | 12 #include "core/frame/FrameHost.h" |
| 12 #include "core/frame/FrameView.h" | 13 #include "core/frame/FrameView.h" |
| 13 #include "core/html/HTMLCanvasElement.h" | 14 #include "core/html/HTMLCanvasElement.h" |
| 14 #include "core/input/EventHandlingUtil.h" | 15 #include "core/input/EventHandlingUtil.h" |
| 15 #include "core/input/TouchActionUtil.h" | 16 #include "core/input/TouchActionUtil.h" |
| 16 #include "core/layout/HitTestCanvasResult.h" | 17 #include "core/layout/HitTestCanvasResult.h" |
| 17 #include "core/page/ChromeClient.h" | 18 #include "core/page/ChromeClient.h" |
| 18 #include "core/page/Page.h" | 19 #include "core/page/Page.h" |
| 19 #include "platform/Histogram.h" | 20 #include "platform/Histogram.h" |
| 20 #include "public/platform/WebTouchEvent.h" | 21 #include "public/platform/WebTouchEvent.h" |
| 21 #include "wtf/CurrentTime.h" | 22 #include "wtf/CurrentTime.h" |
| 22 #include "wtf/PtrUtil.h" | 23 #include "wtf/PtrUtil.h" |
| 23 #include <memory> | |
| 24 | 24 |
| 25 namespace blink { | 25 namespace blink { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 bool hasTouchHandlers(const EventHandlerRegistry& registry) { | 29 bool hasTouchHandlers(const EventHandlerRegistry& registry) { |
| 30 return registry.hasEventHandlers( | 30 return registry.hasEventHandlers( |
| 31 EventHandlerRegistry::TouchStartOrMoveEventBlocking) || | 31 EventHandlerRegistry::TouchStartOrMoveEventBlocking) || |
| 32 registry.hasEventHandlers( | 32 registry.hasEventHandlers( |
| 33 EventHandlerRegistry::TouchStartOrMoveEventPassive) || | 33 EventHandlerRegistry::TouchStartOrMoveEventPassive) || |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 } | 512 } |
| 513 | 513 |
| 514 return dispatchTouchEvents(event, touchInfos, allTouchesReleased); | 514 return dispatchTouchEvents(event, touchInfos, allTouchesReleased); |
| 515 } | 515 } |
| 516 | 516 |
| 517 bool TouchEventManager::isAnyTouchActive() const { | 517 bool TouchEventManager::isAnyTouchActive() const { |
| 518 return m_touchPressed; | 518 return m_touchPressed; |
| 519 } | 519 } |
| 520 | 520 |
| 521 } // namespace blink | 521 } // namespace blink |
| OLD | NEW |