| 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 #ifndef ScrollManager_h | 5 #ifndef ScrollManager_h |
| 6 #define ScrollManager_h | 6 #define ScrollManager_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/page/EventWithHitTestResults.h" | 9 #include "core/page/EventWithHitTestResults.h" |
| 10 #include "platform/geometry/LayoutSize.h" | 10 #include "platform/geometry/LayoutSize.h" |
| 11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
| 12 #include "platform/heap/Visitor.h" | 12 #include "platform/heap/Visitor.h" |
| 13 #include "platform/scroll/ScrollTypes.h" | 13 #include "platform/scroll/ScrollTypes.h" |
| 14 #include "public/platform/WebInputEventResult.h" | 14 #include "public/platform/WebInputEventResult.h" |
| 15 #include "wtf/Allocator.h" | 15 #include "wtf/Allocator.h" |
| 16 #include <deque> | 16 #include <deque> |
| 17 | 17 |
| 18 namespace blink { | 18 namespace blink { |
| 19 | 19 |
| 20 class AutoscrollController; | 20 class AutoscrollController; |
| 21 class FrameHost; | |
| 22 class LayoutBox; | 21 class LayoutBox; |
| 23 class LayoutObject; | 22 class LayoutObject; |
| 24 class LocalFrame; | 23 class LocalFrame; |
| 25 class PaintLayer; | 24 class PaintLayer; |
| 26 class PaintLayerScrollableArea; | 25 class PaintLayerScrollableArea; |
| 26 class Page; |
| 27 class Scrollbar; | 27 class Scrollbar; |
| 28 class ScrollState; | 28 class ScrollState; |
| 29 class WebGestureEvent; | 29 class WebGestureEvent; |
| 30 | 30 |
| 31 // This class takes care of scrolling and resizing and the related states. The | 31 // This class takes care of scrolling and resizing and the related states. The |
| 32 // user action that causes scrolling or resizing is determined in other *Manager | 32 // user action that causes scrolling or resizing is determined in other *Manager |
| 33 // classes and they call into this class for doing the work. | 33 // classes and they call into this class for doing the work. |
| 34 class CORE_EXPORT ScrollManager | 34 class CORE_EXPORT ScrollManager |
| 35 : public GarbageCollectedFinalized<ScrollManager> { | 35 : public GarbageCollectedFinalized<ScrollManager> { |
| 36 WTF_MAKE_NONCOPYABLE(ScrollManager); | 36 WTF_MAKE_NONCOPYABLE(ScrollManager); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 WebInputEventResult handleGestureScrollUpdate(const WebGestureEvent&); | 95 WebInputEventResult handleGestureScrollUpdate(const WebGestureEvent&); |
| 96 WebInputEventResult handleGestureScrollBegin(const WebGestureEvent&); | 96 WebInputEventResult handleGestureScrollBegin(const WebGestureEvent&); |
| 97 | 97 |
| 98 WebInputEventResult passScrollGestureEvent(const WebGestureEvent&, | 98 WebInputEventResult passScrollGestureEvent(const WebGestureEvent&, |
| 99 LayoutObject*); | 99 LayoutObject*); |
| 100 | 100 |
| 101 void clearGestureScrollState(); | 101 void clearGestureScrollState(); |
| 102 | 102 |
| 103 void customizedScroll(const Node& startNode, ScrollState&); | 103 void customizedScroll(const Node& startNode, ScrollState&); |
| 104 | 104 |
| 105 FrameHost* frameHost() const; | 105 Page* page() const; |
| 106 | 106 |
| 107 bool isViewportScrollingElement(const Element&) const; | 107 bool isViewportScrollingElement(const Element&) const; |
| 108 | 108 |
| 109 bool handleScrollGestureOnResizer(Node*, const WebGestureEvent&); | 109 bool handleScrollGestureOnResizer(Node*, const WebGestureEvent&); |
| 110 | 110 |
| 111 void recomputeScrollChain(const Node& startNode, | 111 void recomputeScrollChain(const Node& startNode, |
| 112 std::deque<int>& scrollChain); | 112 std::deque<int>& scrollChain); |
| 113 | 113 |
| 114 // NOTE: If adding a new field to this class please ensure that it is | 114 // NOTE: If adding a new field to this class please ensure that it is |
| 115 // cleared in |ScrollManager::clear()|. | 115 // cleared in |ScrollManager::clear()|. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 140 | 140 |
| 141 Member<PaintLayerScrollableArea> m_resizeScrollableArea; | 141 Member<PaintLayerScrollableArea> m_resizeScrollableArea; |
| 142 | 142 |
| 143 LayoutSize | 143 LayoutSize |
| 144 m_offsetFromResizeCorner; // In the coords of m_resizeScrollableArea. | 144 m_offsetFromResizeCorner; // In the coords of m_resizeScrollableArea. |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 } // namespace blink | 147 } // namespace blink |
| 148 | 148 |
| 149 #endif // ScrollManager_h | 149 #endif // ScrollManager_h |
| OLD | NEW |