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

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

Issue 10151025: Add scale factor tag to data packs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
« no previous file with comments | « content/test/test_content_client.cc ('k') | ui/base/resource/data_pack.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/data_pack.h
diff --git a/ui/base/resource/data_pack.h b/ui/base/resource/data_pack.h
index 5e3426f8b7df1dfdae813c8a6321b9d1d460bc68..0ac5efedb8b765321c83b602c9d0dcaff25cd7e8 100644
--- a/ui/base/resource/data_pack.h
+++ b/ui/base/resource/data_pack.h
@@ -32,7 +32,7 @@ namespace ui {
class UI_EXPORT DataPack : public ResourceHandle {
public:
- DataPack();
+ DataPack(float scale_factor);
virtual ~DataPack();
// Load a pack file from |path|, returning false on error.
@@ -52,6 +52,7 @@ class UI_EXPORT DataPack : public ResourceHandle {
virtual base::RefCountedStaticMemory* GetStaticMemory(
uint16 resource_id) const OVERRIDE;
virtual TextEncodingType GetTextEncodingType() const OVERRIDE;
+ virtual float GetScaleFactor() const OVERRIDE;
private:
// The memory-mapped data.
@@ -63,6 +64,10 @@ class UI_EXPORT DataPack : public ResourceHandle {
// Type of encoding for text resources.
TextEncodingType text_encoding_type_;
+ // The scale of the image in this resource pack relative to images in the 1x
+ // resource pak.
+ float scale_factor_;
+
DISALLOW_COPY_AND_ASSIGN(DataPack);
};
« no previous file with comments | « content/test/test_content_client.cc ('k') | ui/base/resource/data_pack.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698