Chromium Code Reviews| Index: content/child/webthemeengine_impl_default.cc |
| diff --git a/content/child/webthemeengine_impl_default.cc b/content/child/webthemeengine_impl_default.cc |
| index 7fa4ba7d6497c2d374257db255e91d283d2c24cc..5332f05f83b9dc01630868d6473809cbd0f7db12 100644 |
| --- a/content/child/webthemeengine_impl_default.cc |
| +++ b/content/child/webthemeengine_impl_default.cc |
| @@ -8,7 +8,6 @@ |
| #include "skia/ext/platform_canvas.h" |
| #include "third_party/WebKit/public/platform/WebRect.h" |
| #include "third_party/WebKit/public/platform/WebSize.h" |
| -#include "ui/native_theme/native_theme.h" |
| using blink::WebCanvas; |
| using blink::WebColor; |
| @@ -177,6 +176,17 @@ static void GetNativeThemeExtraParams( |
| native_theme_extra_params->progress_bar.value_rect_height = |
| extra_params->progressBar.valueRectHeight; |
| break; |
| + case WebThemeEngine::PartScrollbarHorizontalThumb: |
| + case WebThemeEngine::PartScrollbarVerticalThumb: |
| + if (extra_params) { |
| + native_theme_extra_params->scrollbar_theme = |
|
bokan
2016/10/21 16:57:14
These should be |native_theme_extra_params->scroll
|
| + static_cast<ui::NativeTheme::ScrollbarOverlayColorTheme>( |
| + extra_params->scrollbarTheme); |
| + } else { |
|
bokan
2016/10/21 16:57:14
The other cases here assume extra_params is always
|
| + native_theme_extra_params->scrollbar_theme = ui::NativeTheme:: |
| + ScrollbarOverlayColorTheme::ScrollbarOverlayColorThemeDefault; |
| + } |
| + break; |
| default: |
| break; // Parts that have no extra params get here. |
| } |
| @@ -221,15 +231,17 @@ void WebThemeEngineImpl::paint( |
| native_theme_extra_params); |
| } |
| -void WebThemeEngineImpl::paintStateTransition(blink::WebCanvas* canvas, |
| - WebThemeEngine::Part part, |
| - WebThemeEngine::State startState, |
| - WebThemeEngine::State endState, |
| - double progress, |
| - const blink::WebRect& rect) { |
| +void WebThemeEngineImpl::paintStateTransition( |
| + blink::WebCanvas* canvas, |
| + WebThemeEngine::Part part, |
| + WebThemeEngine::State startState, |
| + WebThemeEngine::State endState, |
| + double progress, |
| + const blink::WebRect& rect, |
| + ui::NativeTheme::ScrollbarOverlayColorTheme theme) { |
| ui::NativeTheme::GetInstanceForWeb()->PaintStateTransition( |
| canvas, NativeThemePart(part), NativeThemeState(startState), |
| - NativeThemeState(endState), progress, gfx::Rect(rect)); |
| + NativeThemeState(endState), progress, gfx::Rect(rect), theme); |
| } |
| #if defined(OS_WIN) |