summaryrefslogtreecommitdiffstats
path: root/components/html_viewer
diff options
context:
space:
mode:
authorestade <estade@chromium.org>2015-11-24 12:41:41 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-24 20:42:41 +0000
commit66a425008f1da8e72274421285fd5bf8d8d78d6b (patch)
tree707a1a86e9ec99a5fd59839439add7a8975a624a /components/html_viewer
parentaee36769b10db06493038e23773234a2d4159c4a (diff)
downloadchromium_src-66a425008f1da8e72274421285fd5bf8d8d78d6b.zip
chromium_src-66a425008f1da8e72274421285fd5bf8d8d78d6b.tar.gz
chromium_src-66a425008f1da8e72274421285fd5bf8d8d78d6b.tar.bz2
Change name of NativeTheme::instance() to make it clear it's web only.
(e.g. for rendering blink controls) Remove almost all uses of NativeTheme::instance() throughout Chrome. For OSX it should be safe to just use NativeThemeMac::instance() in its place. For Views, views need to use GetNativeTheme() (after being added to a Widget). BUG=558029 Review URL: https://codereview.chromium.org/1461923002 Cr-Commit-Position: refs/heads/master@{#361434}
Diffstat (limited to 'components/html_viewer')
-rw-r--r--components/html_viewer/web_theme_engine_impl.cc22
1 files changed, 7 insertions, 15 deletions
diff --git a/components/html_viewer/web_theme_engine_impl.cc b/components/html_viewer/web_theme_engine_impl.cc
index 21672a2..15b06ae 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