Index: content/app/content_main_runner.cc |
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc |
index 24a528929e5acd2c7bfaa4ade8cca1bc32ebb621..04cfca28e3953dedf4338f91d275a29b866669c4 100644 |
--- a/content/app/content_main_runner.cc |
+++ b/content/app/content_main_runner.cc |
@@ -74,6 +74,8 @@ |
#include <atlapp.h> |
#include <malloc.h> |
#include <cstring> |
+#include "base/strings/string_number_conversions.h" |
sky
2014/06/03 15:59:06
nit: newline between 76/77.
ananta
2014/06/03 19:18:13
Done.
|
+#include "ui/gfx/win/dpi.h" |
#elif defined(OS_MACOSX) |
#include "base/mac/scoped_nsautorelease_pool.h" |
#if !defined(OS_IOS) |
@@ -658,6 +660,13 @@ class ContentMainRunnerImpl : public ContentMainRunner { |
if (command_line.HasSwitch(switches::kEnableHighResolutionTime)) |
base::TimeTicks::SetNowIsHighResNowIfSupported(); |
+ if (command_line.HasSwitch(switches::kUseDeviceScaleFactor)) { |
+ std::string scale_factor_string = command_line.GetSwitchValueASCII( |
+ switches::kUseDeviceScaleFactor); |
+ double scale_factor = 0; |
+ if (base::StringToDouble(scale_factor_string, &scale_factor)) |
+ gfx::InitDeviceScaleFactor(scale_factor); |
+ } |
sky
2014/06/03 15:59:06
Can you keep the DCHECK in GetDeviceScaleFactor()
ananta
2014/06/03 19:18:37
Done.
|
SetupCRT(command_line); |
#endif |