Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(848)

Side by Side Diff: content/child/webthemeengine_impl_default.cc

Issue 2478463003: Revert of Implement overlay scrollbar fade out for non-composited scrollers. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
13 12
14 using blink::WebCanvas; 13 using blink::WebCanvas;
15 using blink::WebColor; 14 using blink::WebColor;
16 using blink::WebRect; 15 using blink::WebRect;
17 using blink::WebThemeEngine; 16 using blink::WebThemeEngine;
18 using blink::WebScrollbarOverlayColorTheme; 17 using blink::WebScrollbarOverlayColorTheme;
19 18
20 namespace content { 19 namespace content {
21 namespace { 20 namespace {
22 21
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 const blink::WebRect& rect, 236 const blink::WebRect& rect,
238 const WebThemeEngine::ExtraParams* extra_params) { 237 const WebThemeEngine::ExtraParams* extra_params) {
239 ui::NativeTheme::ExtraParams native_theme_extra_params; 238 ui::NativeTheme::ExtraParams native_theme_extra_params;
240 GetNativeThemeExtraParams( 239 GetNativeThemeExtraParams(
241 part, state, extra_params, &native_theme_extra_params); 240 part, state, extra_params, &native_theme_extra_params);
242 ui::NativeTheme::GetInstanceForWeb()->Paint( 241 ui::NativeTheme::GetInstanceForWeb()->Paint(
243 canvas, NativeThemePart(part), NativeThemeState(state), gfx::Rect(rect), 242 canvas, NativeThemePart(part), NativeThemeState(state), gfx::Rect(rect),
244 native_theme_extra_params); 243 native_theme_extra_params);
245 } 244 }
246 245
247 void WebThemeEngineImpl::getOverlayScrollbarStyle(ScrollbarStyle* style) {
248 style->fadeOutDelaySeconds = ui::kOverlayScrollbarFadeOutDelay.InSecondsF();
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
256 #if defined(OS_WIN) 246 #if defined(OS_WIN)
257 // static 247 // static
258 void WebThemeEngineImpl::cacheScrollBarMetrics( 248 void WebThemeEngineImpl::cacheScrollBarMetrics(
259 int32_t vertical_scroll_bar_width, 249 int32_t vertical_scroll_bar_width,
260 int32_t horizontal_scroll_bar_height, 250 int32_t horizontal_scroll_bar_height,
261 int32_t vertical_arrow_bitmap_height, 251 int32_t vertical_arrow_bitmap_height,
262 int32_t horizontal_arrow_bitmap_width) { 252 int32_t horizontal_arrow_bitmap_width) {
263 g_vertical_scroll_bar_width = vertical_scroll_bar_width; 253 g_vertical_scroll_bar_width = vertical_scroll_bar_width;
264 g_horizontal_scroll_bar_height = horizontal_scroll_bar_height; 254 g_horizontal_scroll_bar_height = horizontal_scroll_bar_height;
265 g_vertical_arrow_bitmap_height = vertical_arrow_bitmap_height; 255 g_vertical_arrow_bitmap_height = vertical_arrow_bitmap_height;
266 g_horizontal_arrow_bitmap_width = horizontal_arrow_bitmap_width; 256 g_horizontal_arrow_bitmap_width = horizontal_arrow_bitmap_width;
267 } 257 }
268 #endif 258 #endif
269 259
270 } // namespace content 260 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698