OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "ui/views/controls/scrollbar/base_scroll_bar_thumb.h" | 5 #include "ui/views/controls/scrollbar/base_scroll_bar_thumb.h" |
6 | 6 |
7 #include "ui/gfx/canvas.h" | 7 #include "ui/gfx/canvas.h" |
8 #include "ui/gfx/rect.h" | 8 #include "ui/gfx/geometry/rect.h" |
9 #include "ui/views/controls/scrollbar/base_scroll_bar.h" | 9 #include "ui/views/controls/scrollbar/base_scroll_bar.h" |
10 | 10 |
11 namespace { | 11 namespace { |
12 // The distance the mouse can be dragged outside the bounds of the thumb during | 12 // The distance the mouse can be dragged outside the bounds of the thumb during |
13 // dragging before the scrollbar will snap back to its regular position. | 13 // dragging before the scrollbar will snap back to its regular position. |
14 static const int kScrollThumbDragOutSnap = 100; | 14 static const int kScrollThumbDragOutSnap = 100; |
15 } | 15 } |
16 | 16 |
17 namespace views { | 17 namespace views { |
18 | 18 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 if (state_ == state) | 126 if (state_ == state) |
127 return; | 127 return; |
128 | 128 |
129 CustomButton::ButtonState old_state = state_; | 129 CustomButton::ButtonState old_state = state_; |
130 state_ = state; | 130 state_ = state; |
131 scroll_bar_->OnThumbStateChanged(old_state, state); | 131 scroll_bar_->OnThumbStateChanged(old_state, state); |
132 SchedulePaint(); | 132 SchedulePaint(); |
133 } | 133 } |
134 | 134 |
135 } // namespace views | 135 } // namespace views |
OLD | NEW |