Chromium Code Reviews| 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|. |