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_BASE_SCROLL_BAR_H_ | 5 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ |
6 #define UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ | 6 #define UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ |
7 | 7 |
8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
9 #include "ui/views/animation/scroll_animator.h" | 9 #include "ui/views/animation/scroll_animator.h" |
10 #include "ui/views/context_menu_controller.h" | 10 #include "ui/views/context_menu_controller.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 // Scroll the contents by the specified offset (contents coordinates). | 58 // Scroll the contents by the specified offset (contents coordinates). |
59 bool ScrollByContentsOffset(int contents_offset); | 59 bool ScrollByContentsOffset(int contents_offset); |
60 | 60 |
61 // Called when the thumb state has been changed from |old_state| to | 61 // Called when the thumb state has been changed from |old_state| to |
62 // |new_state|. | 62 // |new_state|. |
63 void OnThumbStateChanged(CustomButton::ButtonState old_state, | 63 void OnThumbStateChanged(CustomButton::ButtonState old_state, |
64 CustomButton::ButtonState new_state); | 64 CustomButton::ButtonState new_state); |
65 | 65 |
66 // View overrides: | 66 // View overrides: |
67 virtual gfx::Size GetPreferredSize() OVERRIDE = 0; | 67 virtual gfx::Size GetPreferredSize() const OVERRIDE = 0; |
68 virtual void Layout() OVERRIDE = 0; | 68 virtual void Layout() OVERRIDE = 0; |
69 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 69 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
70 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 70 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
71 virtual void OnMouseCaptureLost() OVERRIDE; | 71 virtual void OnMouseCaptureLost() OVERRIDE; |
72 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; | 72 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; |
73 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; | 73 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; |
74 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; | 74 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; |
75 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; | 75 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; |
76 | 76 |
77 // ui::EventHandler overrides: | 77 // ui::EventHandler overrides: |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 // TODO(tdresser): This should be removed when raw pixel scrolling for views | 183 // TODO(tdresser): This should be removed when raw pixel scrolling for views |
184 // is enabled. See crbug.com/329354. | 184 // is enabled. See crbug.com/329354. |
185 gfx::Vector2dF roundoff_error_; | 185 gfx::Vector2dF roundoff_error_; |
186 | 186 |
187 DISALLOW_COPY_AND_ASSIGN(BaseScrollBar); | 187 DISALLOW_COPY_AND_ASSIGN(BaseScrollBar); |
188 }; | 188 }; |
189 | 189 |
190 } // namespace views | 190 } // namespace views |
191 | 191 |
192 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ | 192 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ |
OLD | NEW |