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

Unified Diff: content/child/webthemeengine_impl_default.cc

Issue 1461923002: Change name of NativeTheme::instance() to make it clear it's web only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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
Index: content/child/webthemeengine_impl_default.cc
diff --git a/content/child/webthemeengine_impl_default.cc b/content/child/webthemeengine_impl_default.cc
index de236fc582371ebdd66c89ce3b0f9a35d9b88246..727976e24813eb6a2d0dbfcee11d27ce1089230e 100644
--- a/content/child/webthemeengine_impl_default.cc
+++ b/content/child/webthemeengine_impl_default.cc
@@ -203,9 +203,8 @@ blink::WebSize WebThemeEngineImpl::getSize(WebThemeEngine::Part part) {
break;
}
#endif
- return ui::NativeTheme::instance()->GetPartSize(native_theme_part,
- ui::NativeTheme::kNormal,
- extra);
+ return ui::NativeTheme::GetInstanceForWeb()->GetPartSize(
+ native_theme_part, ui::NativeTheme::kNormal, extra);
}
void WebThemeEngineImpl::paint(
@@ -217,11 +216,8 @@ void WebThemeEngineImpl::paint(
ui::NativeTheme::ExtraParams native_theme_extra_params;
GetNativeThemeExtraParams(
part, state, extra_params, &native_theme_extra_params);
- ui::NativeTheme::instance()->Paint(
- canvas,
- NativeThemePart(part),
- NativeThemeState(state),
- gfx::Rect(rect),
+ ui::NativeTheme::GetInstanceForWeb()->Paint(
+ canvas, NativeThemePart(part), NativeThemeState(state), gfx::Rect(rect),
native_theme_extra_params);
}
@@ -231,13 +227,9 @@ void WebThemeEngineImpl::paintStateTransition(blink::WebCanvas* canvas,
WebThemeEngine::State endState,
double progress,
const blink::WebRect& rect) {
- ui::NativeTheme::instance()->PaintStateTransition(
- canvas,
- NativeThemePart(part),
- NativeThemeState(startState),
- NativeThemeState(endState),
- progress,
- gfx::Rect(rect));
+ ui::NativeTheme::GetInstanceForWeb()->PaintStateTransition(
+ canvas, NativeThemePart(part), NativeThemeState(startState),
+ NativeThemeState(endState), progress, gfx::Rect(rect));
}
#if defined(OS_WIN)

Powered by Google App Engine
This is Rietveld 408576698