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

Unified Diff: components/html_viewer/web_theme_engine_impl.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: NATIVE_THEME_EXPORT for mac 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: components/html_viewer/web_theme_engine_impl.cc
diff --git a/components/html_viewer/web_theme_engine_impl.cc b/components/html_viewer/web_theme_engine_impl.cc
index 21672a29cec34f952bffdb7c0ba04e90e7e02a06..15b06ae9ea15270ff7536faa60522b6f22e31168 100644
--- a/components/html_viewer/web_theme_engine_impl.cc
+++ b/components/html_viewer/web_theme_engine_impl.cc
@@ -167,9 +167,8 @@ void GetNativeThemeExtraParams(
blink::WebSize WebThemeEngineImpl::getSize(WebThemeEngine::Part part) {
ui::NativeTheme::ExtraParams extra;
- return ui::NativeTheme::instance()->GetPartSize(NativeThemePart(part),
- ui::NativeTheme::kNormal,
- extra);
+ return ui::NativeTheme::GetInstanceForWeb()->GetPartSize(
+ NativeThemePart(part), ui::NativeTheme::kNormal, extra);
}
void WebThemeEngineImpl::paint(
@@ -181,11 +180,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);
}
@@ -195,13 +191,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));
}
} // namespace html_viewer
« no previous file with comments | « chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc ('k') | content/child/webthemeengine_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698