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

Unified Diff: chrome/browser/renderer_preferences_util.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, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_preferences_util.cc
diff --git a/chrome/browser/renderer_preferences_util.cc b/chrome/browser/renderer_preferences_util.cc
index ce174ef34c6375bea36ef73df2423d1df201c96f..3d90eff29110cadd5db54911de0e57ab33d73057 100644
--- a/chrome/browser/renderer_preferences_util.cc
+++ b/chrome/browser/renderer_preferences_util.cc
@@ -31,11 +31,6 @@
#include "ui/views/linux_ui/linux_ui.h"
#endif
-#if defined(OS_WIN)
-#include "base/win/win_util.h"
-#include "ui/gfx/platform_font_win.h"
-#endif
-
namespace renderer_preferences_util {
void UpdateFromSystemSettings(content::RendererPreferences* prefs,
@@ -121,31 +116,6 @@ void UpdateFromSystemSettings(content::RendererPreferences* prefs,
prefs->plugin_fullscreen_allowed =
pref_service->GetBoolean(prefs::kFullscreenAllowed);
#endif
-
-#if defined(OS_WIN)
- NONCLIENTMETRICS_XP metrics = {0};
- base::win::GetNonClientMetrics(&metrics);
-
- prefs->caption_font_family_name = metrics.lfCaptionFont.lfFaceName;
- prefs->caption_font_height = gfx::PlatformFontWin::GetFontSize(
- metrics.lfCaptionFont);
-
- prefs->small_caption_font_family_name = metrics.lfSmCaptionFont.lfFaceName;
- prefs->small_caption_font_height = gfx::PlatformFontWin::GetFontSize(
- metrics.lfSmCaptionFont);
-
- prefs->menu_font_family_name = metrics.lfMenuFont.lfFaceName;
- prefs->menu_font_height = gfx::PlatformFontWin::GetFontSize(
- metrics.lfMenuFont);
-
- prefs->status_font_family_name = metrics.lfStatusFont.lfFaceName;
- prefs->status_font_height = gfx::PlatformFontWin::GetFontSize(
- metrics.lfStatusFont);
-
- prefs->message_font_family_name = metrics.lfMessageFont.lfFaceName;
- prefs->message_font_height = gfx::PlatformFontWin::GetFontSize(
- metrics.lfMessageFont);
-#endif
}
} // namespace renderer_preferences_util
« no previous file with comments | « no previous file | content/browser/renderer_host/render_view_host_impl.cc » ('j') | content/child/webthemeengine_impl_default.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698