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 |
112 private: | 116 private: |
113 friend class test::ScrollViewTestApi; | 117 friend class test::ScrollViewTestApi; |
114 | 118 |
115 class Viewport; | 119 class Viewport; |
116 | 120 |
117 // Used internally by SetHeader() and SetContents() to reset the view. Sets | 121 // Used internally by SetHeader() and SetContents() to reset the view. Sets |
118 // |member| to |new_view|. If |new_view| is non-null it is added to |parent|. | 122 // |member| to |new_view|. If |new_view| is non-null it is added to |parent|. |
119 void SetHeaderOrContents(View* parent, View* new_view, View** member); | 123 void SetHeaderOrContents(View* parent, View* new_view, View** member); |
120 | 124 |
121 // Scrolls the minimum amount necessary to make the specified rectangle | 125 // Scrolls the minimum amount necessary to make the specified rectangle |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 private: | 260 private: |
257 int top_margin_; | 261 int top_margin_; |
258 int row_height_; | 262 int row_height_; |
259 | 263 |
260 DISALLOW_COPY_AND_ASSIGN(FixedRowHeightScrollHelper); | 264 DISALLOW_COPY_AND_ASSIGN(FixedRowHeightScrollHelper); |
261 }; | 265 }; |
262 | 266 |
263 } // namespace views | 267 } // namespace views |
264 | 268 |
265 #endif // UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ | 269 #endif // UI_VIEWS_CONTROLS_SCROLL_VIEW_H_ |
OLD | NEW |