| Index: ui/base/resource/resource_bundle.h
|
| diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h
|
| index d9731032d1484bcc1f88f84214ca50f5aeb3e2d1..9d1127755b91f7ef5f8cb71a962d9d89df3313c9 100644
|
| --- a/ui/base/resource/resource_bundle.h
|
| +++ b/ui/base/resource/resource_bundle.h
|
| @@ -105,11 +105,16 @@ class ResourceBundle {
|
| //
|
| // !! THIS IS DEPRECATED. PLEASE USE THE METHOD BELOW. !!
|
| SkBitmap* GetBitmapNamed(int resource_id);
|
| + bool GetBitmapsNamed(int resource_id, std::vector<SkBitmap*>& bitmaps);
|
|
|
| // Gets an image resource from the current module data. This will load the
|
| // image in Skia format by default. The ResourceBundle owns this.
|
| gfx::Image& GetImageNamed(int resource_id);
|
|
|
| + // Gets images for the given |resource_id|. This can be used for icons
|
| + // rendered at multiple resolutions.
|
| + bool GetImagesNamed(int resource_id, std::vector<gfx::Image*>& images);
|
| +
|
| // Similar to GetImageNamed, but rather than loading the image in Skia format,
|
| // it will load in the native platform type. This can avoid conversion from
|
| // one image type to another. ResourceBundle owns the result.
|
| @@ -228,6 +233,10 @@ class ResourceBundle {
|
| // Initialize all the gfx::Font members if they haven't yet been initialized.
|
| void LoadFontsIfNecessary();
|
|
|
| + // Gets images from the cache.
|
| + bool GetImagesFromCacheNamed(int resource_id,
|
| + std::vector<gfx::Image*>& images);
|
| +
|
| #if defined(USE_BASE_DATA_PACK)
|
| // Returns the full pathname of the main resources file to load. May return
|
| // an empty string if no main resources data files are found.
|
| @@ -245,10 +254,10 @@ class ResourceBundle {
|
| static RefCountedStaticMemory* LoadResourceBytes(DataHandle module,
|
| int resource_id);
|
|
|
| - // Creates and returns a new SkBitmap given the data file to look in and the
|
| - // resource id. It's up to the caller to free the returned bitmap when
|
| - // done.
|
| - static SkBitmap* LoadBitmap(DataHandle dll_inst, int resource_id);
|
| + // Creates and returns SkBitmaps given the data file to look in and the
|
| + // resource id.
|
| + static bool LoadBitmaps(DataHandle dll_inst, int resource_id,
|
| + std::vector<SkBitmap>& bitmaps);
|
|
|
| // Returns an empty image for when a resource cannot be loaded. This is a
|
| // bright red bitmap.
|
| @@ -267,7 +276,7 @@ class ResourceBundle {
|
|
|
| // Cached images. The ResourceBundle caches all retrieved images and keeps
|
| // ownership of the pointers.
|
| - typedef std::map<int, gfx::Image*> ImageMap;
|
| + typedef std::map<int, std::vector<gfx::Image*>* > ImageMap;
|
| ImageMap images_;
|
|
|
| // The various fonts used. Cached to avoid repeated GDI creation/destruction.
|
|
|