| 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 TopDocumentRootScrollerController_h | 5 #ifndef TopDocumentRootScrollerController_h |
| 6 #define TopDocumentRootScrollerController_h | 6 #define TopDocumentRootScrollerController_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/page/scrolling/RootScrollerController.h" | 9 #include "core/page/scrolling/RootScrollerController.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // ViewportScrollCallback managed by this class. | 46 // ViewportScrollCallback managed by this class. |
| 47 // TODO(bokan): Temporarily needed to allow ScrollCustomization to | 47 // TODO(bokan): Temporarily needed to allow ScrollCustomization to |
| 48 // differentiate between real custom callback and the built-in viewport | 48 // differentiate between real custom callback and the built-in viewport |
| 49 // apply scroll. crbug.com/623079. | 49 // apply scroll. crbug.com/623079. |
| 50 bool isViewportScrollCallback( | 50 bool isViewportScrollCallback( |
| 51 const ScrollStateCallback*) const override; | 51 const ScrollStateCallback*) const override; |
| 52 | 52 |
| 53 // Returns the GraphicsLayer for the global root scroller. | 53 // Returns the GraphicsLayer for the global root scroller. |
| 54 GraphicsLayer* rootScrollerLayer() override; | 54 GraphicsLayer* rootScrollerLayer() override; |
| 55 | 55 |
| 56 // Returns the Element that's the global root scroller. |
| 57 Element* globalRootScroller() const; |
| 58 |
| 56 protected: | 59 protected: |
| 57 TopDocumentRootScrollerController(Document&); | 60 TopDocumentRootScrollerController(Document&); |
| 58 | 61 |
| 59 // Called when the root scroller of descendant frames changes. | 62 // Called when the root scroller of descendant frames changes. |
| 60 void globalRootScrollerMayHaveChanged() override; | 63 void globalRootScrollerMayHaveChanged() override; |
| 61 | 64 |
| 62 private: | 65 private: |
| 63 // Calculates the Element that should be the globalRootScroller. On a | 66 // Calculates the Element that should be the globalRootScroller. On a |
| 64 // simple page, this will simply the root frame's effectiveRootScroller but | 67 // simple page, this will simply the root frame's effectiveRootScroller but |
| 65 // if the root scroller is set to an iframe, this will then descend into | 68 // if the root scroller is set to an iframe, this will then descend into |
| (...skipping 10 matching lines...) Expand all Loading... |
| 76 Member<ViewportScrollCallback> m_viewportApplyScroll; | 79 Member<ViewportScrollCallback> m_viewportApplyScroll; |
| 77 | 80 |
| 78 // The page level root scroller. i.e. The actual element for which scrolling | 81 // The page level root scroller. i.e. The actual element for which scrolling |
| 79 // should move top controls and produce overscroll glow. | 82 // should move top controls and produce overscroll glow. |
| 80 WeakMember<Element> m_globalRootScroller; | 83 WeakMember<Element> m_globalRootScroller; |
| 81 }; | 84 }; |
| 82 | 85 |
| 83 } // namespace blink | 86 } // namespace blink |
| 84 | 87 |
| 85 #endif // RootScrollerController_h | 88 #endif // RootScrollerController_h |
| OLD | NEW |