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

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: Fixed Compositing browser tests high dpi 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 | « content/browser/renderer_host/render_widget_host_view_browsertest.cc ('k') | 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..690335aabc8c02e3791bda48643ff5409f366066 100644
--- a/ui/base/layout.h
+++ b/ui/base/layout.h
@@ -57,7 +57,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|.
@@ -77,6 +78,9 @@ UI_BASE_EXPORT bool IsScaleFactorSupported(ScaleFactor scale_factor);
// Finding the closest match is inefficient and shouldn't be done frequently.
UI_BASE_EXPORT ScaleFactor FindClosestScaleFactorUnsafe(float scale);
+// Returns the image scale for the scale factor passed in.
+UI_BASE_EXPORT float GetScaleForScaleFactor(ScaleFactor scale_factor);
+
namespace test {
// Class which changes the value of GetSupportedScaleFactors() to
// |new_scale_factors| for the duration of its lifetime.
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_browsertest.cc ('k') | ui/base/layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698