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

Unified Diff: ui/base/layout.h

Issue 211493009: Ensure that extension resources are loaded with the correct scaling applied on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed the GetImageScaleForScaleFactor function Created 6 years, 9 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 | « no previous file | ui/base/layout.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/layout.h
diff --git a/ui/base/layout.h b/ui/base/layout.h
index 2ea39a289e2cb482e0d658629f232096dde4738d..cefeaa51dd2cdb0e76e314ec4dae04c0a8661edf 100644
--- a/ui/base/layout.h
+++ b/ui/base/layout.h
@@ -47,6 +47,9 @@ enum ScaleFactor {
NUM_SCALE_FACTORS // This always appears last.
};
+// List of scales for each scale factor defined above
+extern float g_kScaleFactorScales[NUM_SCALE_FACTORS];
sky 2014/03/27 15:43:07 I don't like exposing this. For one it isn't const
ananta 2014/03/27 19:05:07 Done.
+
// Changes the value of GetSupportedScaleFactors() to |scale_factors|.
// Use ScopedSetSupportedScaleFactors for unit tests as not to affect the
// state of other tests.
@@ -57,7 +60,8 @@ UI_BASE_EXPORT void SetSupportedScaleFactors(
// platform, in ascending order.
UI_BASE_EXPORT const std::vector<ScaleFactor>& GetSupportedScaleFactors();
-// Returns the float scale value for |scale_factor|.
+// Returns the actual image scale to be used for the scale factor passed in.
+// On Windows high dpi, this returns the dpi scale for the display.
UI_BASE_EXPORT float GetImageScale(ScaleFactor scale_factor);
// Returns the supported ScaleFactor which most closely matches |scale|.
« no previous file with comments | « no previous file | ui/base/layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698