Index: ui/base/resource/resource_bundle.h |
diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h |
index 7b06e5e9dea469f4ca118cab590e92be1b1a90a0..eb046ea5b19d6a2c32288bdbc39cc55dae1db6a1 100644 |
--- a/ui/base/resource/resource_bundle.h |
+++ b/ui/base/resource/resource_bundle.h |
@@ -130,6 +130,19 @@ class UI_EXPORT ResourceBundle { |
// the resource. Returns whether we successfully read the resource. |
base::RefCountedStaticMemory* LoadDataResourceBytes(int resource_id) const; |
+ // Loads and returns the raw bytes of an image data resource nearest the |
+ // target scale factor without doing any processing or interpretation of the |
+ // resource. Returns a RefCountedStaticMemory pointer to the image bytes on |
+ // success or NULL on failure to locate the resource. |
+ base::RefCountedStaticMemory* LoadImageResourceBytes( |
sail
2012/05/09 16:09:41
Instead of adding additional APIs we should just a
flackr
2012/05/09 19:57:01
We could do this but the scale factor doesn't make
sail
2012/05/09 20:08:19
For for loading images we'll now have two APIs, on
flackr
2012/05/09 20:15:42
I assume you were tongue twisted and meant to say
flackr
2012/05/09 20:16:53
Alternately as a low road approach we could assert
|
+ int resource_id, |
+ float scale_factor) const; |
+ |
+ // Returns the contents of an image resource in a StringPiece nearest the |
+ // scale factor |scale_factor| given the resource id. |
+ base::StringPiece GetRawImageResource(int resource_id, |
sail
2012/05/09 16:09:41
same
|
+ float scale_factor) const; |
+ |
// Return the contents of a resource in a StringPiece given the resource id. |
base::StringPiece GetRawDataResource(int resource_id) const; |