OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/child/webthemeengine_impl_android.h" | 5 #include "content/child/webthemeengine_impl_android.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "skia/ext/platform_canvas.h" | 8 #include "skia/ext/platform_canvas.h" |
9 #include "third_party/WebKit/public/platform/WebRect.h" | 9 #include "third_party/WebKit/public/platform/WebRect.h" |
10 #include "third_party/WebKit/public/platform/WebSize.h" | 10 #include "third_party/WebKit/public/platform/WebSize.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 native_theme_extra_params->progress_bar.value_rect_height = | 152 native_theme_extra_params->progress_bar.value_rect_height = |
153 extra_params->progressBar.valueRectHeight; | 153 extra_params->progressBar.valueRectHeight; |
154 break; | 154 break; |
155 default: | 155 default: |
156 break; // Parts that have no extra params get here. | 156 break; // Parts that have no extra params get here. |
157 } | 157 } |
158 } | 158 } |
159 | 159 |
160 blink::WebSize WebThemeEngineImpl::getSize(WebThemeEngine::Part part) { | 160 blink::WebSize WebThemeEngineImpl::getSize(WebThemeEngine::Part part) { |
161 ui::NativeTheme::ExtraParams extra; | 161 ui::NativeTheme::ExtraParams extra; |
162 return ui::NativeTheme::instance()->GetPartSize( | 162 return ui::NativeTheme::GetInstanceForWeb()->GetPartSize( |
163 NativeThemePart(part), ui::NativeTheme::kNormal, extra); | 163 NativeThemePart(part), ui::NativeTheme::kNormal, extra); |
164 } | 164 } |
165 | 165 |
166 void WebThemeEngineImpl::paint( | 166 void WebThemeEngineImpl::paint( |
167 blink::WebCanvas* canvas, | 167 blink::WebCanvas* canvas, |
168 WebThemeEngine::Part part, | 168 WebThemeEngine::Part part, |
169 WebThemeEngine::State state, | 169 WebThemeEngine::State state, |
170 const blink::WebRect& rect, | 170 const blink::WebRect& rect, |
171 const WebThemeEngine::ExtraParams* extra_params) { | 171 const WebThemeEngine::ExtraParams* extra_params) { |
172 ui::NativeTheme::ExtraParams native_theme_extra_params; | 172 ui::NativeTheme::ExtraParams native_theme_extra_params; |
173 GetNativeThemeExtraParams( | 173 GetNativeThemeExtraParams( |
174 part, state, extra_params, &native_theme_extra_params); | 174 part, state, extra_params, &native_theme_extra_params); |
175 ui::NativeTheme::instance()->Paint( | 175 ui::NativeTheme::GetInstanceForWeb()->Paint( |
176 canvas, | 176 canvas, NativeThemePart(part), NativeThemeState(state), gfx::Rect(rect), |
177 NativeThemePart(part), | |
178 NativeThemeState(state), | |
179 gfx::Rect(rect), | |
180 native_theme_extra_params); | 177 native_theme_extra_params); |
181 } | 178 } |
182 } // namespace content | 179 } // namespace content |
OLD | NEW |