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 "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "base/string16.h" | 14 #include "base/string16.h" |
15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
16 #include "gfx/canvas.h" | |
17 #include "grit/app_strings.h" | 16 #include "grit/app_strings.h" |
18 #include "third_party/skia/include/core/SkBitmap.h" | 17 #include "third_party/skia/include/core/SkBitmap.h" |
19 #include "ui/base/keycodes/keyboard_codes.h" | 18 #include "ui/base/keycodes/keyboard_codes.h" |
20 #include "ui/base/l10n/l10n_util.h" | 19 #include "ui/base/l10n/l10n_util.h" |
| 20 #include "ui/gfx/canvas.h" |
21 #include "views/controls/menu/menu.h" | 21 #include "views/controls/menu/menu.h" |
22 #include "views/controls/scroll_view.h" | 22 #include "views/controls/scroll_view.h" |
23 #include "views/widget/widget.h" | 23 #include "views/widget/widget.h" |
24 #include "views/window/window.h" | 24 #include "views/window/window.h" |
25 | 25 |
26 #undef min | 26 #undef min |
27 #undef max | 27 #undef max |
28 | 28 |
29 namespace views { | 29 namespace views { |
30 | 30 |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 thumb_position = thumb_position - (thumb_->GetSize() / 2); | 717 thumb_position = thumb_position - (thumb_->GetSize() / 2); |
718 return (thumb_position * contents_size_) / GetTrackSize(); | 718 return (thumb_position * contents_size_) / GetTrackSize(); |
719 } | 719 } |
720 | 720 |
721 void BitmapScrollBar::SetThumbTrackState(CustomButton::ButtonState state) { | 721 void BitmapScrollBar::SetThumbTrackState(CustomButton::ButtonState state) { |
722 thumb_track_state_ = state; | 722 thumb_track_state_ = state; |
723 SchedulePaint(); | 723 SchedulePaint(); |
724 } | 724 } |
725 | 725 |
726 } // namespace views | 726 } // namespace views |
OLD | NEW |