| 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_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 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "ui/views/view.h" | 10 #include "ui/views/view.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // version simply wraps a native windows scrollbar. | 53 // version simply wraps a native windows scrollbar. |
| 54 // | 54 // |
| 55 // A scrollbar is either horizontal or vertical | 55 // A scrollbar is either horizontal or vertical |
| 56 // | 56 // |
| 57 ///////////////////////////////////////////////////////////////////////////// | 57 ///////////////////////////////////////////////////////////////////////////// |
| 58 class VIEWS_EXPORT ScrollBar : public View { | 58 class VIEWS_EXPORT ScrollBar : public View { |
| 59 public: | 59 public: |
| 60 virtual ~ScrollBar(); | 60 virtual ~ScrollBar(); |
| 61 | 61 |
| 62 // Overridden from View: | 62 // Overridden from View: |
| 63 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 63 virtual void GetAccessibleState(ui::AXViewState* state) override; |
| 64 | 64 |
| 65 // Returns whether this scrollbar is horizontal. | 65 // Returns whether this scrollbar is horizontal. |
| 66 bool IsHorizontal() const; | 66 bool IsHorizontal() const; |
| 67 | 67 |
| 68 void set_controller(ScrollBarController* controller) { | 68 void set_controller(ScrollBarController* controller) { |
| 69 controller_ = controller; | 69 controller_ = controller; |
| 70 } | 70 } |
| 71 ScrollBarController* controller() const { return controller_; } | 71 ScrollBarController* controller() const { return controller_; } |
| 72 | 72 |
| 73 // Update the scrollbar appearance given a viewport size, content size and | 73 // Update the scrollbar appearance given a viewport size, content size and |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 ScrollBarController* controller_; | 105 ScrollBarController* controller_; |
| 106 | 106 |
| 107 int max_pos_; | 107 int max_pos_; |
| 108 | 108 |
| 109 DISALLOW_COPY_AND_ASSIGN(ScrollBar); | 109 DISALLOW_COPY_AND_ASSIGN(ScrollBar); |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 } // namespace views | 112 } // namespace views |
| 113 | 113 |
| 114 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_ | 114 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_ |
| OLD | NEW |