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

Side by Side Diff: content/renderer/render_view_win.cc

Issue 1054243002: Avoid calling the GetSystemMetrics API in the renderer process on Windows to get the scrollbar metr… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months 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 (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/public/common/renderer_preferences.h" 5 #include "content/public/common/renderer_preferences.h"
6 #include "content/child/webthemeengine_impl_default.h"
6 #include "content/renderer/render_view_impl.h" 7 #include "content/renderer/render_view_impl.h"
7 #include "third_party/WebKit/public/web/win/WebFontRendering.h" 8 #include "third_party/WebKit/public/web/win/WebFontRendering.h"
8 #include "ui/gfx/font_render_params.h" 9 #include "ui/gfx/font_render_params.h"
9 10
10 using blink::WebFontRendering; 11 using blink::WebFontRendering;
11 12
12 namespace content { 13 namespace content {
13 14
14 void RenderViewImpl::UpdateFontRenderingFromRendererPrefs() { 15 void RenderViewImpl::UpdateFontRenderingFromRendererPrefs() {
15 const RendererPreferences& prefs = renderer_preferences_; 16 const RendererPreferences& prefs = renderer_preferences_;
(...skipping 10 matching lines...) Expand all
26 prefs.status_font_family_name.c_str(), prefs.status_font_height); 27 prefs.status_font_family_name.c_str(), prefs.status_font_height);
27 28
28 blink::WebFontRendering::setLCDOrder( 29 blink::WebFontRendering::setLCDOrder(
29 gfx::FontRenderParams::SubpixelRenderingToSkiaLCDOrder( 30 gfx::FontRenderParams::SubpixelRenderingToSkiaLCDOrder(
30 prefs.subpixel_rendering)); 31 prefs.subpixel_rendering));
31 blink::WebFontRendering::setLCDOrientation( 32 blink::WebFontRendering::setLCDOrientation(
32 gfx::FontRenderParams::SubpixelRenderingToSkiaLCDOrientation( 33 gfx::FontRenderParams::SubpixelRenderingToSkiaLCDOrientation(
33 prefs.subpixel_rendering)); 34 prefs.subpixel_rendering));
34 } 35 }
35 36
37 void RenderViewImpl::UpdateThemePrefs() {
38 WebThemeEngineImpl::CacheScrollBarMetrics(
39 renderer_preferences_.vertical_scroll_bar_width_in_dips,
40 renderer_preferences_.horizontal_scroll_bar_height_in_dips,
41 renderer_preferences_.arrow_bitmap_height_vertical_scroll_bar_in_dips,
42 renderer_preferences_.arrow_bitmap_width_horizontal_scroll_bar_in_dips);
43 }
44
36 } // namespace content 45 } // namespace content
OLDNEW
« content/public/common/renderer_preferences.cc ('K') | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698