| Index: content/browser/renderer_host/render_view_host_impl.cc
|
| diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
|
| index cdc82e9fd70e405aa7aaa81a6964cbe4ebbae1fa..43baae9b82c27a47d092d77bf23a859b66c176a3 100644
|
| --- a/content/browser/renderer_host/render_view_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_view_host_impl.cc
|
| @@ -89,6 +89,8 @@
|
|
|
| #if defined(OS_WIN)
|
| #include "base/win/win_util.h"
|
| +#include "ui/gfx/platform_font_win.h"
|
| +#include "ui/gfx/win/dpi.h"
|
| #endif
|
|
|
| using base::TimeDelta;
|
| @@ -124,6 +126,40 @@ void DismissVirtualKeyboardTask() {
|
| }
|
| }
|
| }
|
| +
|
| +void GetWindowsSpecificPrefs(RendererPreferences* prefs) {
|
| + 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);
|
| +
|
| + prefs->vertical_scroll_bar_width_in_dips =
|
| + gfx::win::GetSystemMetricsInDIP(SM_CXVSCROLL);
|
| + prefs->horizontal_scroll_bar_height_in_dips =
|
| + gfx::win::GetSystemMetricsInDIP(SM_CYHSCROLL);
|
| + prefs->arrow_bitmap_height_vertical_scroll_bar_in_dips =
|
| + gfx::win::GetSystemMetricsInDIP(SM_CYVSCROLL);
|
| + prefs->arrow_bitmap_width_horizontal_scroll_bar_in_dips =
|
| + gfx::win::GetSystemMetricsInDIP(SM_CXHSCROLL);
|
| +}
|
| #endif
|
|
|
| } // namespace
|
| @@ -267,6 +303,9 @@ bool RenderViewHostImpl::CreateRenderView(
|
| ViewMsg_New_Params params;
|
| params.renderer_preferences =
|
| delegate_->GetRendererPrefs(GetProcess()->GetBrowserContext());
|
| +#if defined(OS_WIN)
|
| + GetWindowsSpecificPrefs(¶ms.renderer_preferences);
|
| +#endif
|
| params.web_preferences = GetWebkitPreferences();
|
| params.view_id = GetRoutingID();
|
| params.main_frame_routing_id = main_frame_routing_id_;
|
|
|