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

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: Created 6 years, 7 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: 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..a9fa2ed0a34b4c7dc1e8ebc22c9b37f935fadb65 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -166,8 +166,10 @@
#if defined(OS_WIN)
#include "base/win/scoped_com_initializer.h"
+#include "base/strings/string_number_conversions.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::kUseDeviceScaleFactor,
+ base::DoubleToString(gfx::GetDPIScale()));
+#endif
+
AppendCompositorCommandLineFlags(command_line);
}

Powered by Google App Engine
This is Rietveld 408576698