| Index: content/child/webthemeengine_impl_default.cc
|
| diff --git a/content/child/webthemeengine_impl_default.cc b/content/child/webthemeengine_impl_default.cc
|
| index 169f96952c08e75c5c6b97b7771f2c7b9ca62cdb..f224f1d303903b9867e1c57711ce61adc0af7420 100644
|
| --- a/content/child/webthemeengine_impl_default.cc
|
| +++ b/content/child/webthemeengine_impl_default.cc
|
| @@ -8,6 +8,7 @@
|
| #include "skia/ext/platform_canvas.h"
|
| #include "third_party/WebKit/public/platform/WebRect.h"
|
| #include "third_party/WebKit/public/platform/WebSize.h"
|
| +#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
|
| #include "ui/native_theme/native_theme.h"
|
| #include "ui/native_theme/overlay_scrollbar_constants_aura.h"
|
|
|
| @@ -34,6 +35,11 @@ int32_t g_vertical_arrow_bitmap_height;
|
| int32_t g_horizontal_arrow_bitmap_width;
|
| #endif
|
|
|
| +ui::NativeTheme* nativeThemeInstance() {
|
| + return ui::NativeTheme::GetInstanceForWeb(
|
| + blink::WebRuntimeFeatures::isOverlayScrollbarsEnabled());
|
| +}
|
| +
|
| } // namespace
|
|
|
| static ui::NativeTheme::Part NativeThemePart(
|
| @@ -226,7 +232,7 @@ blink::WebSize WebThemeEngineImpl::getSize(WebThemeEngine::Part part) {
|
| break;
|
| }
|
| #endif
|
| - return ui::NativeTheme::GetInstanceForWeb()->GetPartSize(
|
| + return nativeThemeInstance()->GetPartSize(
|
| native_theme_part, ui::NativeTheme::kNormal, extra);
|
| }
|
|
|
| @@ -239,7 +245,7 @@ void WebThemeEngineImpl::paint(
|
| ui::NativeTheme::ExtraParams native_theme_extra_params;
|
| GetNativeThemeExtraParams(
|
| part, state, extra_params, &native_theme_extra_params);
|
| - ui::NativeTheme::GetInstanceForWeb()->Paint(
|
| + nativeThemeInstance()->Paint(
|
| canvas, NativeThemePart(part), NativeThemeState(state), gfx::Rect(rect),
|
| native_theme_extra_params);
|
| }
|
|
|