Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: ui/views/controls/scroll_view.h

Issue 2680953002: Remove GraphicsLayer::didScroll and directly call ScrollableArea::didScroll (Closed)
Patch Set: Incorporate reviewer comments: more tests, less bad tests Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/compositor/layer.cc ('k') | ui/views/controls/scroll_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « ui/compositor/layer.cc ('k') | ui/views/controls/scroll_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698