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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 void OnScrollEvent(ui::ScrollEvent* event) override; | 102 void OnScrollEvent(ui::ScrollEvent* event) override; |
103 void OnGestureEvent(ui::GestureEvent* event) override; | 103 void OnGestureEvent(ui::GestureEvent* event) override; |
104 const char* GetClassName() const override; | 104 const char* GetClassName() const override; |
105 | 105 |
106 // ScrollBarController overrides: | 106 // ScrollBarController overrides: |
107 void ScrollToPosition(ScrollBar* source, int position) override; | 107 void ScrollToPosition(ScrollBar* source, int position) override; |
108 int GetScrollIncrement(ScrollBar* source, | 108 int GetScrollIncrement(ScrollBar* source, |
109 bool is_page, | 109 bool is_page, |
110 bool is_positive) override; | 110 bool is_positive) override; |
111 | 111 |
112 // TODO(djacobo): Remove this method when http://crbug.com/656198 is closed. | |
113 // Force |contents_viewport_| to enable a Layer(). | |
114 void EnableViewPortLayer(); | |
115 | |
116 private: | 112 private: |
117 friend class test::ScrollViewTestApi; | 113 friend class test::ScrollViewTestApi; |
118 | 114 |
119 class Viewport; | 115 class Viewport; |
120 | 116 |
121 // Used internally by SetHeader() and SetContents() to reset the view. Sets | 117 // Used internally by SetHeader() and SetContents() to reset the view. Sets |
122 // |member| to |new_view|. If |new_view| is non-null it is added to |parent|. | 118 // |member| to |new_view|. If |new_view| is non-null it is added to |parent|. |
123 void SetHeaderOrContents(View* parent, View* new_view, View** member); | 119 void SetHeaderOrContents(View* parent, View* new_view, View** member); |
124 | 120 |
125 // Scrolls the minimum amount necessary to make the specified rectangle | 121 // Scrolls the minimum amount necessary to make the specified rectangle |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 private: | 256 private: |
261 int top_margin_; | 257 int top_margin_; |
262 int row_height_; | 258 int row_height_; |
263 | 259 |
264 DISALLOW_COPY_AND_ASSIGN(FixedRowHeightScrollHelper); | 260 DISALLOW_COPY_AND_ASSIGN(FixedRowHeightScrollHelper); |
265 }; | 261 }; |
266 | 262 |
267 } // namespace views | 263 } // namespace views |
268 | 264 |
269 #endif // UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ | 265 #endif // UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ |
OLD | NEW |