OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 RootFrameViewport_h | 5 #ifndef RootFrameViewport_h |
6 #define RootFrameViewport_h | 6 #define RootFrameViewport_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "platform/scroll/ScrollableArea.h" | 9 #include "platform/scroll/ScrollableArea.h" |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 void invalidateScrollCornerRect(const IntRect&) override; | 60 void invalidateScrollCornerRect(const IntRect&) override; |
61 GraphicsLayer* layerForContainer() const override; | 61 GraphicsLayer* layerForContainer() const override; |
62 GraphicsLayer* layerForScrolling() const override; | 62 GraphicsLayer* layerForScrolling() const override; |
63 GraphicsLayer* layerForHorizontalScrollbar() const override; | 63 GraphicsLayer* layerForHorizontalScrollbar() const override; |
64 GraphicsLayer* layerForVerticalScrollbar() const override; | 64 GraphicsLayer* layerForVerticalScrollbar() const override; |
65 ScrollResultOneDimensional userScroll(ScrollDirectionPhysical, ScrollGranula
rity, float delta = 1) override; | 65 ScrollResultOneDimensional userScroll(ScrollDirectionPhysical, ScrollGranula
rity, float delta = 1) override; |
66 bool scrollAnimatorEnabled() const override; | 66 bool scrollAnimatorEnabled() const override; |
67 HostWindow* hostWindow() const override; | 67 HostWindow* hostWindow() const override; |
68 void serviceScrollAnimations(double) override; | 68 void serviceScrollAnimations(double) override; |
69 void updateCompositorScrollAnimations() override; | 69 void updateCompositorScrollAnimations() override; |
70 virtual ScrollBehavior scrollBehaviorStyle() const override; | 70 ScrollBehavior scrollBehaviorStyle() const override; |
71 // TODO(bokan): This method should be removed. It should be replaced by | 71 // TODO(bokan): This method should be removed. It should be replaced by |
72 // making EventHandler::handleWheelEvent unpack the WheelEvent and make a | 72 // making EventHandler::handleWheelEvent unpack the WheelEvent and make a |
73 // call to this class' scroll method. | 73 // call to this class' scroll method. |
74 ScrollResult handleWheel(const PlatformWheelEvent&) override; | 74 ScrollResult handleWheel(const PlatformWheelEvent&) override; |
75 | 75 |
76 private: | 76 private: |
77 RootFrameViewport(ScrollableArea& visualViewport, ScrollableArea& layoutView
port); | 77 RootFrameViewport(ScrollableArea& visualViewport, ScrollableArea& layoutView
port); |
78 | 78 |
79 DoublePoint scrollOffsetFromScrollAnimators() const; | 79 DoublePoint scrollOffsetFromScrollAnimators() const; |
80 | 80 |
81 // If either of the layout or visual viewports are scrolled explicitly (i.e.
not | 81 // If either of the layout or visual viewports are scrolled explicitly (i.e.
not |
82 // through this class), their updated offset will not be reflected in this c
lass' | 82 // through this class), their updated offset will not be reflected in this c
lass' |
83 // animator so use this method to pull updated values when necessary. | 83 // animator so use this method to pull updated values when necessary. |
84 void updateScrollAnimator(); | 84 void updateScrollAnimator(); |
85 | 85 |
86 ScrollableArea& visualViewport() const { ASSERT(m_visualViewport); return *m
_visualViewport; } | 86 ScrollableArea& visualViewport() const { ASSERT(m_visualViewport); return *m
_visualViewport; } |
87 ScrollableArea& layoutViewport() const { ASSERT(m_layoutViewport); return *m
_layoutViewport; } | 87 ScrollableArea& layoutViewport() const { ASSERT(m_layoutViewport); return *m
_layoutViewport; } |
88 | 88 |
89 RawPtrWillBeMember<ScrollableArea> m_visualViewport; | 89 RawPtrWillBeMember<ScrollableArea> m_visualViewport; |
90 RawPtrWillBeMember<ScrollableArea> m_layoutViewport; | 90 RawPtrWillBeMember<ScrollableArea> m_layoutViewport; |
91 }; | 91 }; |
92 | 92 |
93 } // namespace blink | 93 } // namespace blink |
94 | 94 |
95 #endif // RootFrameViewport_h | 95 #endif // RootFrameViewport_h |
OLD | NEW |