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..cd5500a78601f0228a97ecd2b1fe41670b3c5fcd 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); |
| + // 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; |
|
esprehn
2016/05/23 23:11:19
remove parens
Bret
2016/05/23 23:44:06
Done.
|
| if (part == NativeTheme::kScrollbarVerticalThumb) |
| thumb_rect.Inset(kThumbPadding, extra_padding); |
| else |