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

Unified Diff: ui/base/resource/resource_handle.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/resource_handle.h
diff --git a/ui/base/resource/resource_handle.h b/ui/base/resource/resource_handle.h
index b40741e7599b48537f1e95c21c2ac85d62965500..1d26e720a948a0f5a7bb290b31fa0136c98316ed 100644
--- a/ui/base/resource/resource_handle.h
+++ b/ui/base/resource/resource_handle.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/string_piece.h"
+#include "ui/base/layout.h"
#include "ui/base/ui_export.h"
namespace base {
@@ -25,12 +26,11 @@ class UI_EXPORT ResourceHandle {
UTF16
};
- // The scale factors for image resources.
- static const float kScaleFactor100x;
- static const float kScaleFactor200x;
-
virtual ~ResourceHandle() {}
+ // Returns true if the DataPack contains a resource with id |resource_id|.
+ virtual bool HasResource(uint16 resource_id) const = 0;
+
// Get resource by id |resource_id|, filling in |data|.
// The data is owned by the DataPack object and should not be modified.
// Returns false if the resource id isn't found.
@@ -47,7 +47,7 @@ class UI_EXPORT ResourceHandle {
// The scale of images in this resource pack relative to images in the 1x
// resource pak.
- virtual float GetScaleFactor() const = 0;
+ virtual ScaleFactor GetScaleFactor() const = 0;
};
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698