Chromium Code Reviews| Index: ui/native_theme/native_theme_base.cc |
| diff --git a/ui/native_theme/native_theme_base.cc b/ui/native_theme/native_theme_base.cc |
| index 331ceb46be0a5bfe58551fccd79bd72ee21cbf3f..995910000caaba3b7bd39fe3b21e8e1480b41e6e 100644 |
| --- a/ui/native_theme/native_theme_base.cc |
| +++ b/ui/native_theme/native_theme_base.cc |
| @@ -156,12 +156,14 @@ gfx::Size NativeThemeBase::GetPartSize(Part part, |
| return gfx::Size(); |
| } |
| -void NativeThemeBase::PaintStateTransition(SkCanvas* canvas, |
| - Part part, |
| - State startState, |
| - State endState, |
| - double progress, |
| - const gfx::Rect& rect) const { |
| +void NativeThemeBase::PaintStateTransition( |
| + SkCanvas* canvas, |
| + Part part, |
| + State startState, |
| + State endState, |
| + double progress, |
| + const gfx::Rect& rect, |
| + ScrollbarOverlayColorTheme theme) const { |
| if (rect.IsEmpty()) |
| return; |
| @@ -171,7 +173,7 @@ void NativeThemeBase::PaintStateTransition(SkCanvas* canvas, |
| case kScrollbarHorizontalThumb: |
| case kScrollbarVerticalThumb: |
| PaintScrollbarThumbStateTransition(canvas, part, startState, endState, |
| - progress, rect); |
| + progress, rect, theme); |
| break; |
| default: |
| NOTREACHED() << "Does not support state transition for this part:" |
| @@ -227,7 +229,7 @@ void NativeThemeBase::Paint(SkCanvas* canvas, |
| break; |
| case kScrollbarHorizontalThumb: |
| case kScrollbarVerticalThumb: |
| - PaintScrollbarThumb(canvas, part, state, rect); |
| + PaintScrollbarThumb(canvas, part, state, rect, extra.scrollbar_theme); |
| break; |
| case kScrollbarHorizontalTrack: |
| case kScrollbarVerticalTrack: |
| @@ -433,10 +435,12 @@ void NativeThemeBase::PaintScrollbarTrack(SkCanvas* canvas, |
| DrawBox(canvas, rect, paint); |
| } |
| -void NativeThemeBase::PaintScrollbarThumb(SkCanvas* canvas, |
| - Part part, |
| - State state, |
| - const gfx::Rect& rect) const { |
| +void NativeThemeBase::PaintScrollbarThumb( |
| + SkCanvas* canvas, |
| + Part part, |
| + State state, |
| + const gfx::Rect& rect, |
| + ScrollbarOverlayColorTheme theme) const { |
|
bokan
2016/10/21 16:57:14
Make the param unnamed since |theme| is unused her
|
| const bool hovered = state == kHovered; |
| const int midx = rect.x() + rect.width() / 2; |
| const int midy = rect.y() + rect.height() / 2; |