Chromium Code Reviews| Index: ui/display/display.cc |
| diff --git a/ui/display/display.cc b/ui/display/display.cc |
| index 25573f8f9b90e3408ab9234162a0a9b0c92aae70..c403905fb597c5a9201bbce2b6f2b1807c67c725 100644 |
| --- a/ui/display/display.cc |
| +++ b/ui/display/display.cc |
| @@ -90,6 +90,16 @@ void Display::ResetForceDeviceScaleFactorForTesting() { |
| g_forced_device_scale_factor = -1.0; |
| } |
| +// static |
| +void Display::SetForceDeviceScaleFactor(double dsf) { |
| + // Reset any previously set values and unset the flag. |
| + g_has_forced_device_scale_factor = -1; |
| + g_forced_device_scale_factor = -1.0; |
|
oshima
2017/05/09 03:58:21
I somehow missed this change in the first review.
malaykeshav
2017/05/10 05:28:27
It should work. I just read the comment for `g_has
|
| + |
| + base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
| + switches::kForceDeviceScaleFactor, base::StringPrintf("%.2f", dsf)); |
| +} |
| + |
| Display::Display() : Display(kInvalidDisplayId) {} |
| Display::Display(int64_t id) : Display(id, gfx::Rect()) {} |