OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "views/controls/scrollbar/bitmap_scroll_bar.h" | 5 #include "views/controls/scrollbar/bitmap_scroll_bar.h" |
6 | 6 |
7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
8 #include "views/screen.h" | 8 #include "views/screen.h" |
9 #endif | 9 #endif |
10 | 10 |
11 #include "app/gfx/canvas.h" | |
12 #include "app/l10n_util.h" | 11 #include "app/l10n_util.h" |
13 #include "base/callback.h" | 12 #include "base/callback.h" |
14 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
15 #include "base/keyboard_codes.h" | 14 #include "base/keyboard_codes.h" |
16 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
| 16 #include "gfx/canvas.h" |
17 #include "grit/app_strings.h" | 17 #include "grit/app_strings.h" |
18 #include "third_party/skia/include/core/SkBitmap.h" | 18 #include "third_party/skia/include/core/SkBitmap.h" |
19 #include "views/controls/menu/menu.h" | 19 #include "views/controls/menu/menu.h" |
20 #include "views/controls/scroll_view.h" | 20 #include "views/controls/scroll_view.h" |
21 #include "views/widget/widget.h" | 21 #include "views/widget/widget.h" |
22 #include "views/window/window.h" | 22 #include "views/window/window.h" |
23 | 23 |
24 #undef min | 24 #undef min |
25 #undef max | 25 #undef max |
26 | 26 |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 thumb_position = thumb_position - (thumb_->GetSize() / 2); | 713 thumb_position = thumb_position - (thumb_->GetSize() / 2); |
714 return (thumb_position * contents_size_) / GetTrackSize(); | 714 return (thumb_position * contents_size_) / GetTrackSize(); |
715 } | 715 } |
716 | 716 |
717 void BitmapScrollBar::SetThumbTrackState(CustomButton::ButtonState state) { | 717 void BitmapScrollBar::SetThumbTrackState(CustomButton::ButtonState state) { |
718 thumb_track_state_ = state; | 718 thumb_track_state_ = state; |
719 SchedulePaint(); | 719 SchedulePaint(); |
720 } | 720 } |
721 | 721 |
722 } // namespace views | 722 } // namespace views |
OLD | NEW |