Chromium Code Reviews| 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 RootScrollerController_h | 5 #ifndef RootScrollerController_h |
| 6 #define RootScrollerController_h | 6 #define RootScrollerController_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 static RootScrollerController* create( | 45 static RootScrollerController* create( |
| 46 Document& document, | 46 Document& document, |
| 47 ViewportScrollCallback* applyScrollCallback) | 47 ViewportScrollCallback* applyScrollCallback) |
| 48 { | 48 { |
| 49 return new RootScrollerController(document, applyScrollCallback); | 49 return new RootScrollerController(document, applyScrollCallback); |
| 50 } | 50 } |
| 51 | 51 |
| 52 // Creates an apply scroll callback that handles viewport actions like | 52 // Creates an apply scroll callback that handles viewport actions like |
| 53 // TopControls movement and Overscroll. | 53 // TopControls movement and Overscroll. |
| 54 static ViewportScrollCallback* createViewportApplyScroll( | 54 static ViewportScrollCallback* createViewportApplyScroll( |
| 55 TopControls&, OverscrollController&); | 55 TopControls*, OverscrollController*); |
|
tdresser
2016/06/23 14:34:29
We should mention ownership of TopControls and Ove
bokan
2016/06/23 16:12:30
Done. Mentioned it here and in ViewportScrollCallb
| |
| 56 | 56 |
| 57 DECLARE_TRACE(); | 57 DECLARE_TRACE(); |
| 58 | 58 |
| 59 // Sets the element that will be used as the root scroller. This can be | 59 // Sets the element that will be used as the root scroller. This can be |
| 60 // nullptr, in which case we'll use the default element (documentElement) as | 60 // nullptr, in which case we'll use the default element (documentElement) as |
| 61 // the effective root scroller. | 61 // the effective root scroller. |
| 62 void set(Element*); | 62 void set(Element*); |
| 63 | 63 |
| 64 // Returns the element currently set as the root scroller from script. This | 64 // Returns the element currently set as the root scroller from script. This |
| 65 // differs from the effective root scroller since the set Element may not | 65 // differs from the effective root scroller since the set Element may not |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 92 WeakMember<Document> m_document; | 92 WeakMember<Document> m_document; |
| 93 Member<ViewportScrollCallback> m_viewportApplyScroll; | 93 Member<ViewportScrollCallback> m_viewportApplyScroll; |
| 94 | 94 |
| 95 WeakMember<Element> m_rootScroller; | 95 WeakMember<Element> m_rootScroller; |
| 96 WeakMember<Element> m_effectiveRootScroller; | 96 WeakMember<Element> m_effectiveRootScroller; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 } // namespace blink | 99 } // namespace blink |
| 100 | 100 |
| 101 #endif // RootScrollerController_h | 101 #endif // RootScrollerController_h |
| OLD | NEW |