| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 const WebThemeEngine::ExtraParams* extra_params) { | 238 const WebThemeEngine::ExtraParams* extra_params) { |
| 239 ui::NativeTheme::ExtraParams native_theme_extra_params; | 239 ui::NativeTheme::ExtraParams native_theme_extra_params; |
| 240 GetNativeThemeExtraParams( | 240 GetNativeThemeExtraParams( |
| 241 part, state, extra_params, &native_theme_extra_params); | 241 part, state, extra_params, &native_theme_extra_params); |
| 242 ui::NativeTheme::GetInstanceForWeb()->Paint( | 242 ui::NativeTheme::GetInstanceForWeb()->Paint( |
| 243 canvas, NativeThemePart(part), NativeThemeState(state), gfx::Rect(rect), | 243 canvas, NativeThemePart(part), NativeThemeState(state), gfx::Rect(rect), |
| 244 native_theme_extra_params); | 244 native_theme_extra_params); |
| 245 } | 245 } |
| 246 | 246 |
| 247 void WebThemeEngineImpl::GetOverlayScrollbarStyle(ScrollbarStyle* style) { | 247 void WebThemeEngineImpl::GetOverlayScrollbarStyle(ScrollbarStyle* style) { |
| 248 style->fade_out_delay_seconds = | 248 style->fade_out_delay_seconds = ui::kOverlayScrollbarFadeDelay.InSecondsF(); |
| 249 ui::kOverlayScrollbarFadeOutDelay.InSecondsF(); | |
| 250 style->fade_out_duration_seconds = | 249 style->fade_out_duration_seconds = |
| 251 ui::kOverlayScrollbarFadeOutDuration.InSecondsF(); | 250 ui::kOverlayScrollbarFadeDuration.InSecondsF(); |
| 252 // The other fields in this struct are used only on Android to draw solid | 251 // The other fields in this struct are used only on Android to draw solid |
| 253 // color scrollbars. On other platforms the scrollbars are painted in | 252 // color scrollbars. On other platforms the scrollbars are painted in |
| 254 // NativeTheme so these fields are unused. | 253 // NativeTheme so these fields are unused. |
| 255 } | 254 } |
| 256 | 255 |
| 257 bool WebThemeEngineImpl::SupportsNinePatch(Part part) const { | 256 bool WebThemeEngineImpl::SupportsNinePatch(Part part) const { |
| 258 return ui::NativeTheme::GetInstanceForWeb()->SupportsNinePatch( | 257 return ui::NativeTheme::GetInstanceForWeb()->SupportsNinePatch( |
| 259 NativeThemePart(part)); | 258 NativeThemePart(part)); |
| 260 } | 259 } |
| 261 | 260 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 277 int32_t vertical_arrow_bitmap_height, | 276 int32_t vertical_arrow_bitmap_height, |
| 278 int32_t horizontal_arrow_bitmap_width) { | 277 int32_t horizontal_arrow_bitmap_width) { |
| 279 g_vertical_scroll_bar_width = vertical_scroll_bar_width; | 278 g_vertical_scroll_bar_width = vertical_scroll_bar_width; |
| 280 g_horizontal_scroll_bar_height = horizontal_scroll_bar_height; | 279 g_horizontal_scroll_bar_height = horizontal_scroll_bar_height; |
| 281 g_vertical_arrow_bitmap_height = vertical_arrow_bitmap_height; | 280 g_vertical_arrow_bitmap_height = vertical_arrow_bitmap_height; |
| 282 g_horizontal_arrow_bitmap_width = horizontal_arrow_bitmap_width; | 281 g_horizontal_arrow_bitmap_width = horizontal_arrow_bitmap_width; |
| 283 } | 282 } |
| 284 #endif | 283 #endif |
| 285 | 284 |
| 286 } // namespace content | 285 } // namespace content |
| OLD | NEW |