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

Unified Diff: chrome/app/chrome_exe_main_win.cc

Issue 2114503002: Enable Per-Monitor Support for Windows 10 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@framefix
Patch Set: Created 4 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
« chrome/BUILD.gn ('K') | « chrome/BUILD.gn ('k') | 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 86677bf87e7255515594a1417cf827e4257dc42f..c08a9ce7af3b3662402e33fc8cf8d79b33147d66 100644
--- a/chrome/app/chrome_exe_main_win.cc
+++ b/chrome/app/chrome_exe_main_win.cc
@@ -27,6 +27,7 @@
#include "chrome/app/main_dll_loader_win.h"
#include "chrome/browser/policy/policy_path_parser.h"
#include "chrome/browser/win/chrome_process_finder.h"
+#include "chrome/common/channel_info.h"
#include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/installer/util/browser_distribution.h"
@@ -37,6 +38,7 @@
#include "components/crash/content/app/run_as_crashpad_handler_win.h"
#include "components/startup_metric_utils/browser/startup_metric_utils.h"
#include "components/startup_metric_utils/common/pre_read_field_trial_utils_win.h"
+#include "components/version_info/version_info.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/result_codes.h"
@@ -127,7 +129,12 @@ BOOL SetProcessDPIAwareWrapper() {
}
void EnableHighDPISupport() {
- if (!SetProcessDpiAwarenessWrapper(PROCESS_SYSTEM_DPI_AWARE)) {
+ PROCESS_DPI_AWARENESS process_dpi_awareness = PROCESS_SYSTEM_DPI_AWARE;
+ if (base::win::GetVersion() >= base::win::VERSION_WIN10 &&
+ chrome::GetChannel() < version_info::Channel::STABLE) {
+ process_dpi_awareness = PROCESS_PER_MONITOR_DPI_AWARE;
+ }
+ if (!SetProcessDpiAwarenessWrapper(process_dpi_awareness)) {
SetProcessDPIAwareWrapper();
}
}
« chrome/BUILD.gn ('K') | « chrome/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698