| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   67     hide_horizontal_scrollbar_ = visible; |   67     hide_horizontal_scrollbar_ = visible; | 
|   68   } |   68   } | 
|   69  |   69  | 
|   70   // Turns this scroll view into a bounded scroll view, with a fixed height. |   70   // Turns this scroll view into a bounded scroll view, with a fixed height. | 
|   71   // By default, a ScrollView will stretch to fill its outer container. |   71   // By default, a ScrollView will stretch to fill its outer container. | 
|   72   void ClipHeightTo(int min_height, int max_height); |   72   void ClipHeightTo(int min_height, int max_height); | 
|   73  |   73  | 
|   74   // Returns whether or not the ScrollView is bounded (as set by ClipHeightTo). |   74   // Returns whether or not the ScrollView is bounded (as set by ClipHeightTo). | 
|   75   bool is_bounded() const { return max_height_ >= 0 && min_height_ >= 0; } |   75   bool is_bounded() const { return max_height_ >= 0 && min_height_ >= 0; } | 
|   76  |   76  | 
|   77   // Retrieves the width/height of scrollbars. These return 0 if the scrollbar |   77   // Retrieves the width/height reserved for scrollbars. These return 0 if the | 
|   78   // has not yet been created. |   78   // scrollbar has not yet been created or in the case of overlay scrollbars. | 
|   79   int GetScrollBarWidth() const; |   79   int GetScrollBarLayoutWidth() const; | 
|   80   int GetScrollBarHeight() const; |   80   int GetScrollBarLayoutHeight() const; | 
|   81  |   81  | 
|   82   // Returns the horizontal/vertical scrollbar. This may return NULL. |   82   // Returns the horizontal/vertical scrollbar. This may return NULL. | 
|   83   const ScrollBar* horizontal_scroll_bar() const { return horiz_sb_; } |   83   const ScrollBar* horizontal_scroll_bar() const { return horiz_sb_; } | 
|   84   const ScrollBar* vertical_scroll_bar() const { return vert_sb_; } |   84   const ScrollBar* vertical_scroll_bar() const { return vert_sb_; } | 
|   85  |   85  | 
|   86   // Customize the scrollbar design. ScrollView takes the ownership of the |   86   // Customize the scrollbar design. ScrollView takes the ownership of the | 
|   87   // specified ScrollBar. |horiz_sb| and |vert_sb| cannot be NULL. |   87   // specified ScrollBar. |horiz_sb| and |vert_sb| cannot be NULL. | 
|   88   void SetHorizontalScrollBar(ScrollBar* horiz_sb); |   88   void SetHorizontalScrollBar(ScrollBar* horiz_sb); | 
|   89   void SetVerticalScrollBar(ScrollBar* vert_sb); |   89   void SetVerticalScrollBar(ScrollBar* vert_sb); | 
|   90  |   90  | 
| (...skipping 167 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 |