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

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

Issue 10387010: Select theme resources from ResourceBundle at requested scale factor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with master. Created 8 years, 7 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/data_pack.h
diff --git a/ui/base/resource/data_pack.h b/ui/base/resource/data_pack.h
index 0ac5efedb8b765321c83b602c9d0dcaff25cd7e8..3c032536a81d827a1c81a29e867fe3cedcf8da3e 100644
--- a/ui/base/resource/data_pack.h
+++ b/ui/base/resource/data_pack.h
@@ -15,8 +15,9 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/string_piece.h"
-#include "ui/base/ui_export.h"
+#include "ui/base/layout.h"
#include "ui/base/resource/resource_handle.h"
+#include "ui/base/ui_export.h"
class FilePath;
@@ -32,7 +33,7 @@ namespace ui {
class UI_EXPORT DataPack : public ResourceHandle {
public:
- DataPack(float scale_factor);
+ DataPack(ui::ScaleFactor scale_factor);
virtual ~DataPack();
// Load a pack file from |path|, returning false on error.
@@ -47,12 +48,13 @@ class UI_EXPORT DataPack : public ResourceHandle {
TextEncodingType textEncodingType);
// ResourceHandle implementation:
+ virtual bool HasResource(uint16 resource_id) const OVERRIDE;
virtual bool GetStringPiece(uint16 resource_id,
base::StringPiece* data) const OVERRIDE;
virtual base::RefCountedStaticMemory* GetStaticMemory(
uint16 resource_id) const OVERRIDE;
virtual TextEncodingType GetTextEncodingType() const OVERRIDE;
- virtual float GetScaleFactor() const OVERRIDE;
+ virtual ui::ScaleFactor GetScaleFactor() const OVERRIDE;
private:
// The memory-mapped data.
@@ -66,7 +68,7 @@ class UI_EXPORT DataPack : public ResourceHandle {
// The scale of the image in this resource pack relative to images in the 1x
// resource pak.
- float scale_factor_;
+ ui::ScaleFactor scale_factor_;
DISALLOW_COPY_AND_ASSIGN(DataPack);
};

Powered by Google App Engine
This is Rietveld 408576698