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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 308003020: Pass the device scale factor in the command line to renderer processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed presubmit warnings Created 6 years, 6 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
« no previous file with comments | « content/app/content_main_runner.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 98e45d6a13a3609dcd123f443c7b52a23bcfe362..5490265b497500b230ba1bbe9ed93d57a1143f08 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -165,9 +165,11 @@
#endif
#if defined(OS_WIN)
+#include "base/strings/string_number_conversions.h"
#include "base/win/scoped_com_initializer.h"
#include "content/common/font_cache_dispatcher_win.h"
#include "content/common/sandbox_win.h"
+#include "ui/gfx/win/dpi.h"
#endif
#if defined(ENABLE_WEBRTC)
@@ -1037,6 +1039,11 @@ void RenderProcessHostImpl::AppendRendererCommandLine(
if (content::IsPinchToZoomEnabled())
command_line->AppendSwitch(switches::kEnablePinch);
+#if defined(OS_WIN)
+ command_line->AppendSwitchASCII(switches::kDeviceScaleFactor,
+ base::DoubleToString(gfx::GetDPIScale()));
+#endif
+
AppendCompositorCommandLineFlags(command_line);
}
« no previous file with comments | « content/app/content_main_runner.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698