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

Unified Diff: chrome/app/chrome_exe_main_win.cc

Issue 516743002: Force scales 125% and lower down to 100% (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_exe_main_win.cc
diff --git a/chrome/app/chrome_exe_main_win.cc b/chrome/app/chrome_exe_main_win.cc
index 67115ea492add3a5d4b1585bce196e9427445ea4..dccc7fe19307cdd0585f3273beff50979a5bfccd 100644
--- a/chrome/app/chrome_exe_main_win.cc
+++ b/chrome/app/chrome_exe_main_win.cc
@@ -10,6 +10,7 @@
#include "base/at_exit.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
+#include "base/win/scoped_hdc.h"
#include "base/win/windows_version.h"
#include "chrome/app/client_util.h"
#include "chrome/browser/chrome_process_finder_win.h"
@@ -104,6 +105,13 @@ int main() {
if (base::win::GetVersion() > base::win::VERSION_VISTA)
gfx::EnableHighDPISupport();
+ base::win::ScopedGetDC screen_dc(NULL);
+ int dpi_x = ::GetDeviceCaps(screen_dc, LOGPIXELSX);
+ if (dpi_x < 140) {
+ CommandLine::ForCurrentProcess()->AppendSwitchNative(
+ "force-device-scale-factor", L"1");
cpu_(ooo_6.6-7.5) 2014/08/28 20:59:37 kForceDeviceScaleFactor ?
+ }
+
if (AttemptFastNotify(*CommandLine::ForCurrentProcess()))
return 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698