Chromium Code Reviews| 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..bb33a1a69df88c3d4a581de841c09c7f81484c01 100644 |
| --- a/content/app/content_main_runner.cc |
| +++ b/content/app/content_main_runner.cc |
| @@ -49,7 +49,6 @@ |
| #include "sandbox/win/src/sandbox_types.h" |
| #include "ui/base/ui_base_paths.h" |
| #include "ui/base/ui_base_switches.h" |
| -#include "ui/gfx/win/dpi.h" |
| #if defined(USE_TCMALLOC) |
| #include "third_party/tcmalloc/chromium/src/gperftools/malloc_extension.h" |
| @@ -74,6 +73,10 @@ |
| #include <atlapp.h> |
| #include <malloc.h> |
| #include <cstring> |
| + |
| +#include "base/strings/string_number_conversions.h" |
| +#include "ui/base/win/dpi_setup.h" |
| +#include "ui/gfx/win/dpi.h" |
| #elif defined(OS_MACOSX) |
| #include "base/mac/scoped_nsautorelease_pool.h" |
| #if !defined(OS_IOS) |
| @@ -658,6 +661,15 @@ class ContentMainRunnerImpl : public ContentMainRunner { |
| if (command_line.HasSwitch(switches::kEnableHighResolutionTime)) |
| base::TimeTicks::SetNowIsHighResNowIfSupported(); |
| + 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)) |
|
sky
2014/06/03 20:11:43
Don't you need to handle the else care here?
ananta
2014/06/03 20:43:24
Done.
|
| + gfx::InitDeviceScaleFactor(scale_factor); |
| + } else { |
| + ui::win::InitDeviceScaleFactor(); |
| + } |
| SetupCRT(command_line); |
| #endif |