Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Unified Diff: content/child/webthemeengine_impl_default.cc

Issue 2480063002: Split NativeThemeAura into Overlay and NonOverlay versions. (Closed)
Patch Set: Fix Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/webthemeengine_impl_android.cc ('k') | third_party/WebKit/Source/web/WebRuntimeFeatures.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « content/child/webthemeengine_impl_android.cc ('k') | third_party/WebKit/Source/web/WebRuntimeFeatures.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698