| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ | 5 #ifndef UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ |
| 6 #define UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ | 6 #define UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 142 |
| 143 // Helpers to get and set the current scroll offset (either from the ui::Layer | 143 // Helpers to get and set the current scroll offset (either from the ui::Layer |
| 144 // or from the |contents_| origin offset). | 144 // or from the |contents_| origin offset). |
| 145 gfx::ScrollOffset CurrentOffset() const; | 145 gfx::ScrollOffset CurrentOffset() const; |
| 146 void ScrollToOffset(const gfx::ScrollOffset& offset); | 146 void ScrollToOffset(const gfx::ScrollOffset& offset); |
| 147 | 147 |
| 148 // Whether the ScrollView scrolls using ui::Layer APIs. | 148 // Whether the ScrollView scrolls using ui::Layer APIs. |
| 149 bool ScrollsWithLayers() const; | 149 bool ScrollsWithLayers() const; |
| 150 | 150 |
| 151 // Callback entrypoint when hosted Layers are scrolled by the Compositor. | 151 // Callback entrypoint when hosted Layers are scrolled by the Compositor. |
| 152 void OnLayerScrolled(); | 152 void OnLayerScrolled(const gfx::ScrollOffset& offset); |
| 153 | 153 |
| 154 // Horizontally scrolls the header (if any) to match the contents. | 154 // Horizontally scrolls the header (if any) to match the contents. |
| 155 void ScrollHeader(); | 155 void ScrollHeader(); |
| 156 | 156 |
| 157 // The current contents and its viewport. |contents_| is contained in | 157 // The current contents and its viewport. |contents_| is contained in |
| 158 // |contents_viewport_|. | 158 // |contents_viewport_|. |
| 159 View* contents_; | 159 View* contents_; |
| 160 View* contents_viewport_; | 160 View* contents_viewport_; |
| 161 | 161 |
| 162 // The current header and its viewport. |header_| is contained in | 162 // The current header and its viewport. |header_| is contained in |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 private: | 258 private: |
| 259 int top_margin_; | 259 int top_margin_; |
| 260 int row_height_; | 260 int row_height_; |
| 261 | 261 |
| 262 DISALLOW_COPY_AND_ASSIGN(FixedRowHeightScrollHelper); | 262 DISALLOW_COPY_AND_ASSIGN(FixedRowHeightScrollHelper); |
| 263 }; | 263 }; |
| 264 | 264 |
| 265 } // namespace views | 265 } // namespace views |
| 266 | 266 |
| 267 #endif // UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ | 267 #endif // UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ |
| OLD | NEW |