Chromium Code Reviews| Index: ui/native_theme/native_theme_aura.cc |
| diff --git a/ui/native_theme/native_theme_aura.cc b/ui/native_theme/native_theme_aura.cc |
| index 74edcd558c8bb44cc6621c3f100e4a6b58e3f93a..248db953617f2a8d4011e5de20b9b067e53c1af4 100644 |
| --- a/ui/native_theme/native_theme_aura.cc |
| +++ b/ui/native_theme/native_theme_aura.cc |
| @@ -80,12 +80,16 @@ NativeThemeAura* NativeThemeAura::instance() { |
| } |
| #endif |
| -NativeThemeAura::NativeThemeAura() { |
| - // We don't draw scrollbar buttons. |
| +bool NativeThemeAura::HasScrollbarButtons() const { |
| #if defined(OS_CHROMEOS) |
| - set_scrollbar_button_length(0); |
|
Evan Stade
2016/05/24 22:03:54
I still don't understand why you're changing this
|
| + // We don't draw scrollbar buttons. |
| + return false; |
| +#else |
| + return NativeTheme::HasScrollbarButtons(); |
| #endif |
| +} |
| +NativeThemeAura::NativeThemeAura() { |
| // Images and alphas declarations assume the following order. |
| static_assert(kDisabled == 0, "states unexpectedly changed"); |
| static_assert(kHovered == 1, "states unexpectedly changed"); |
| @@ -216,8 +220,7 @@ void NativeThemeAura::PaintScrollbarThumbStateTransition( |
| // If there are no scrollbuttons then provide some padding so that the thumb |
| // doesn't touch the top of the track. |
| const int kThumbPadding = 2; |
| - const int extra_padding = |
| - (scrollbar_button_length() == 0) ? kThumbPadding : 0; |
| + const int extra_padding = HasScrollbarButtons() ? 0 : kThumbPadding; |
| if (part == NativeTheme::kScrollbarVerticalThumb) |
| thumb_rect.Inset(kThumbPadding, extra_padding); |
| else |