| OLD | NEW |
| 1 // Copyright (c) 2011 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_SCROLLBAR_SCROLL_BAR_H_ | 5 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_ |
| 6 #define UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_ | 6 #define UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "ui/views/view.h" | 11 #include "ui/views/view.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 // Get the width or height of this scrollbar, for use in layout calculations. | 86 // Get the width or height of this scrollbar, for use in layout calculations. |
| 87 // For a vertical scrollbar, this is the width of the scrollbar, likewise it | 87 // For a vertical scrollbar, this is the width of the scrollbar, likewise it |
| 88 // is the height for a horizontal scrollbar. | 88 // is the height for a horizontal scrollbar. |
| 89 virtual int GetLayoutSize() const = 0; | 89 virtual int GetLayoutSize() const = 0; |
| 90 | 90 |
| 91 protected: | 91 protected: |
| 92 // Create new scrollbar, either horizontal or vertical. These are protected | 92 // Create new scrollbar, either horizontal or vertical. These are protected |
| 93 // since you need to be creating either a NativeScrollBar or a | 93 // since you need to be creating either a NativeScrollBar or a |
| 94 // BitmapScrollBar. | 94 // BitmapScrollBar. |
| 95 ScrollBar(bool is_horiz); | 95 explicit ScrollBar(bool is_horiz); |
| 96 | 96 |
| 97 private: | 97 private: |
| 98 const bool is_horiz_; | 98 const bool is_horiz_; |
| 99 | 99 |
| 100 ScrollBarController* controller_; | 100 ScrollBarController* controller_; |
| 101 | 101 |
| 102 int max_pos_; | 102 int max_pos_; |
| 103 | 103 |
| 104 DISALLOW_COPY_AND_ASSIGN(ScrollBar); | 104 DISALLOW_COPY_AND_ASSIGN(ScrollBar); |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 } // namespace views | 107 } // namespace views |
| 108 | 108 |
| 109 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_ | 109 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_ |
| OLD | NEW |