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

Unified Diff: ui/gfx/display.cc

Issue 11953054: Fix high-DPI on Windows to make use of DIP scaling in WebKit. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove redundant comments. Created 7 years, 11 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
« no previous file with comments | « ui/gfx/display.h ('k') | ui/gfx/screen_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/display.cc
diff --git a/ui/gfx/display.cc b/ui/gfx/display.cc
index 2a3f10ca2c7a9eadb2db09002017331d140eb149..40608a1d21127d265463131cb069199d6015942b 100644
--- a/ui/gfx/display.cc
+++ b/ui/gfx/display.cc
@@ -9,20 +9,21 @@
#include "base/string_number_conversions.h"
#include "base/stringprintf.h"
#include "ui/base/ui_base_switches.h"
+#include "ui/base/win/dpi.h"
#include "ui/gfx/insets.h"
#include "ui/gfx/size_conversions.h"
namespace gfx {
namespace {
-bool HasForceDeviceScaleFactor() {
+bool HasForceDeviceScaleFactorImpl() {
return CommandLine::ForCurrentProcess()->HasSwitch(
switches::kForceDeviceScaleFactor);
}
float GetForcedDeviceScaleFactorImpl() {
double scale_in_double = 1.0;
- if (HasForceDeviceScaleFactor()) {
+ if (HasForceDeviceScaleFactorImpl()) {
std::string value = CommandLine::ForCurrentProcess()->
GetSwitchValueASCII(switches::kForceDeviceScaleFactor);
if (!base::StringToDouble(value, &scale_in_double))
@@ -42,6 +43,11 @@ float Display::GetForcedDeviceScaleFactor() {
return kForcedDeviceScaleFactor;
}
+//static
+bool Display::HasForceDeviceScaleFactor() {
+ return HasForceDeviceScaleFactorImpl();
+}
+
// static
int64 Display::GetID(uint16 manufacturer_id,
uint16 product_code,
« no previous file with comments | « ui/gfx/display.h ('k') | ui/gfx/screen_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698