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

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

Issue 10387010: Select theme resources from ResourceBundle at requested scale factor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_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;

Powered by Google App Engine
This is Rietveld 408576698