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

Unified Diff: ui/base/resource/resource_handle.h

Issue 10151025: Add scale factor tag to data packs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 8 years, 8 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
Index: ui/base/resource/resource_handle.h
diff --git a/ui/base/resource/resource_handle.h b/ui/base/resource/resource_handle.h
index ce3a23bb2899381c5f4bf194ac135f526e6be1da..bda57613f02393e0ac5a459df0258ee2498dff6c 100644
--- a/ui/base/resource/resource_handle.h
+++ b/ui/base/resource/resource_handle.h
@@ -25,6 +25,10 @@ class UI_EXPORT ResourceHandle {
UTF16
};
+ // The scale factors for image resources.
+ static const float kScaleFactor1x;
Jói 2012/04/26 11:02:05 Idea: Using percentage-based naming might make fo
sail 2012/05/01 04:16:02 Done.
+ static const float kScaleFactor2x;
oshima 2012/04/26 15:32:10 I *think* you can just do static const float kScal
sail 2012/05/01 04:16:02 Unfortunately this only works for ints. For floats
+
virtual ~ResourceHandle() {}
// Get resource by id |resource_id|, filling in |data|.
@@ -40,6 +44,10 @@ class UI_EXPORT ResourceHandle {
// Get the encoding type of text resources.
virtual TextEncodingType GetTextEncodingType() const = 0;
+
+ // The scale of images in this resource pack relative to images in the 1x
+ // resource pak.
+ virtual float GetScaleFactor() const = 0;
};
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698