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

Unified Diff: content/app/content_main_runner.cc

Issue 600263002: Get Win32K lockdown for renderers working again on Windows 8+. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix linux build failures Created 6 years, 3 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/app/content_main_runner.cc
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index 32dd24ef38cab7b06c639924cb01075f7c09edad..b82a1ba36d213073fa24f47c76ce341f65fc10d2 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -622,6 +622,21 @@ class ContentMainRunnerImpl : public ContentMainRunner {
InitializeMojo();
#endif
+#if defined(OS_WIN)
+ bool init_device_scale_factor = true;
+ if (command_line.HasSwitch(switches::kDeviceScaleFactor)) {
+ std::string scale_factor_string = command_line.GetSwitchValueASCII(
+ switches::kDeviceScaleFactor);
+ double scale_factor = 0;
+ if (base::StringToDouble(scale_factor_string, &scale_factor)) {
+ init_device_scale_factor = false;
+ gfx::InitDeviceScaleFactor(scale_factor);
+ }
+ }
+ if (init_device_scale_factor)
+ ui::win::InitDeviceScaleFactor();
+#endif
+
if (!GetContentClient())
SetContentClient(&empty_content_client_);
ContentClientInitializer::Set(process_type, delegate_);
@@ -666,19 +681,6 @@ class ContentMainRunnerImpl : public ContentMainRunner {
MachBroker::ChildSendTaskPortToParent();
}
#elif defined(OS_WIN)
- bool init_device_scale_factor = true;
- if (command_line.HasSwitch(switches::kDeviceScaleFactor)) {
- std::string scale_factor_string = command_line.GetSwitchValueASCII(
- switches::kDeviceScaleFactor);
- double scale_factor = 0;
- if (base::StringToDouble(scale_factor_string, &scale_factor)) {
- init_device_scale_factor = false;
- gfx::InitDeviceScaleFactor(scale_factor);
- }
- }
- if (init_device_scale_factor)
- ui::win::InitDeviceScaleFactor();
-
SetupCRT(command_line);
#endif

Powered by Google App Engine
This is Rietveld 408576698