| 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_default.h" | 5 #include "content/child/webthemeengine_impl_default.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 break; // Parts that have no extra params get here. | 164 break; // Parts that have no extra params get here. |
| 165 } | 165 } |
| 166 } | 166 } |
| 167 | 167 |
| 168 blink::WebSize WebThemeEngineImpl::getSize(WebThemeEngine::Part part) { | 168 blink::WebSize WebThemeEngineImpl::getSize(WebThemeEngine::Part part) { |
| 169 ui::NativeTheme::ExtraParams extra; | 169 ui::NativeTheme::ExtraParams extra; |
| 170 return ui::NativeTheme::GetInstanceForWeb()->GetPartSize( | 170 return ui::NativeTheme::GetInstanceForWeb()->GetPartSize( |
| 171 NativeThemePart(part), ui::NativeTheme::kNormal, extra); | 171 NativeThemePart(part), ui::NativeTheme::kNormal, extra); |
| 172 } | 172 } |
| 173 | 173 |
| 174 bool WebThemeEngineImpl::hasScrollbarButtons() { |
| 175 return ui::NativeTheme::GetInstanceForWeb()->HasScrollbarButtons(); |
| 176 } |
| 177 |
| 174 void WebThemeEngineImpl::paint( | 178 void WebThemeEngineImpl::paint( |
| 175 blink::WebCanvas* canvas, | 179 blink::WebCanvas* canvas, |
| 176 WebThemeEngine::Part part, | 180 WebThemeEngine::Part part, |
| 177 WebThemeEngine::State state, | 181 WebThemeEngine::State state, |
| 178 const blink::WebRect& rect, | 182 const blink::WebRect& rect, |
| 179 const WebThemeEngine::ExtraParams* extra_params) { | 183 const WebThemeEngine::ExtraParams* extra_params) { |
| 180 ui::NativeTheme::ExtraParams native_theme_extra_params; | 184 ui::NativeTheme::ExtraParams native_theme_extra_params; |
| 181 GetNativeThemeExtraParams( | 185 GetNativeThemeExtraParams( |
| 182 part, state, extra_params, &native_theme_extra_params); | 186 part, state, extra_params, &native_theme_extra_params); |
| 183 ui::NativeTheme::GetInstanceForWeb()->Paint( | 187 ui::NativeTheme::GetInstanceForWeb()->Paint( |
| 184 canvas, NativeThemePart(part), NativeThemeState(state), gfx::Rect(rect), | 188 canvas, NativeThemePart(part), NativeThemeState(state), gfx::Rect(rect), |
| 185 native_theme_extra_params); | 189 native_theme_extra_params); |
| 186 } | 190 } |
| 187 | 191 |
| 188 void WebThemeEngineImpl::paintStateTransition(blink::WebCanvas* canvas, | 192 void WebThemeEngineImpl::paintStateTransition(blink::WebCanvas* canvas, |
| 189 WebThemeEngine::Part part, | 193 WebThemeEngine::Part part, |
| 190 WebThemeEngine::State startState, | 194 WebThemeEngine::State startState, |
| 191 WebThemeEngine::State endState, | 195 WebThemeEngine::State endState, |
| 192 double progress, | 196 double progress, |
| 193 const blink::WebRect& rect) { | 197 const blink::WebRect& rect) { |
| 194 ui::NativeTheme::GetInstanceForWeb()->PaintStateTransition( | 198 ui::NativeTheme::GetInstanceForWeb()->PaintStateTransition( |
| 195 canvas, NativeThemePart(part), NativeThemeState(startState), | 199 canvas, NativeThemePart(part), NativeThemeState(startState), |
| 196 NativeThemeState(endState), progress, gfx::Rect(rect)); | 200 NativeThemeState(endState), progress, gfx::Rect(rect)); |
| 197 } | 201 } |
| 198 | 202 |
| 199 } // namespace content | 203 } // namespace content |
| OLD | NEW |