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" |
11 #include "ui/native_theme/native_theme.h" | 11 #include "ui/native_theme/native_theme.h" |
12 #include "ui/native_theme/overlay_scrollbar_constants_aura.h" | |
12 | 13 |
13 using blink::WebCanvas; | 14 using blink::WebCanvas; |
14 using blink::WebColor; | 15 using blink::WebColor; |
15 using blink::WebRect; | 16 using blink::WebRect; |
16 using blink::WebThemeEngine; | 17 using blink::WebThemeEngine; |
17 using blink::WebScrollbarOverlayColorTheme; | 18 using blink::WebScrollbarOverlayColorTheme; |
18 | 19 |
19 namespace content { | 20 namespace content { |
20 namespace { | 21 namespace { |
21 | 22 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
236 const blink::WebRect& rect, | 237 const blink::WebRect& rect, |
237 const WebThemeEngine::ExtraParams* extra_params) { | 238 const WebThemeEngine::ExtraParams* extra_params) { |
238 ui::NativeTheme::ExtraParams native_theme_extra_params; | 239 ui::NativeTheme::ExtraParams native_theme_extra_params; |
239 GetNativeThemeExtraParams( | 240 GetNativeThemeExtraParams( |
240 part, state, extra_params, &native_theme_extra_params); | 241 part, state, extra_params, &native_theme_extra_params); |
241 ui::NativeTheme::GetInstanceForWeb()->Paint( | 242 ui::NativeTheme::GetInstanceForWeb()->Paint( |
242 canvas, NativeThemePart(part), NativeThemeState(state), gfx::Rect(rect), | 243 canvas, NativeThemePart(part), NativeThemeState(state), gfx::Rect(rect), |
243 native_theme_extra_params); | 244 native_theme_extra_params); |
244 } | 245 } |
245 | 246 |
247 void WebThemeEngineImpl::getOverlayScrollbarStyle(ScrollbarStyle* style) { | |
248 style->fadeOutDelaySeconds = ui::kOverlayScrollbarFadeOutDelay.InSecondsF(); | |
skobes
2016/11/02 23:46:43
2-space indent
| |
249 style->fadeOutDurationSeconds = | |
250 ui::kOverlayScrollbarFadeOutDuration.InSecondsF(); | |
251 // The other fields in this struct are used only on Android to draw solid | |
252 // color scrollbars. On other platforms the scrollbars are painted in | |
253 // NativeTheme so these fields are unused. | |
254 } | |
255 | |
246 #if defined(OS_WIN) | 256 #if defined(OS_WIN) |
247 // static | 257 // static |
248 void WebThemeEngineImpl::cacheScrollBarMetrics( | 258 void WebThemeEngineImpl::cacheScrollBarMetrics( |
249 int32_t vertical_scroll_bar_width, | 259 int32_t vertical_scroll_bar_width, |
250 int32_t horizontal_scroll_bar_height, | 260 int32_t horizontal_scroll_bar_height, |
251 int32_t vertical_arrow_bitmap_height, | 261 int32_t vertical_arrow_bitmap_height, |
252 int32_t horizontal_arrow_bitmap_width) { | 262 int32_t horizontal_arrow_bitmap_width) { |
253 g_vertical_scroll_bar_width = vertical_scroll_bar_width; | 263 g_vertical_scroll_bar_width = vertical_scroll_bar_width; |
254 g_horizontal_scroll_bar_height = horizontal_scroll_bar_height; | 264 g_horizontal_scroll_bar_height = horizontal_scroll_bar_height; |
255 g_vertical_arrow_bitmap_height = vertical_arrow_bitmap_height; | 265 g_vertical_arrow_bitmap_height = vertical_arrow_bitmap_height; |
256 g_horizontal_arrow_bitmap_width = horizontal_arrow_bitmap_width; | 266 g_horizontal_arrow_bitmap_width = horizontal_arrow_bitmap_width; |
257 } | 267 } |
258 #endif | 268 #endif |
259 | 269 |
260 } // namespace content | 270 } // namespace content |
OLD | NEW |