 Chromium Code Reviews
 Chromium Code Reviews Issue 6849030:
  Add support for multi resolution icons   (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 6849030:
  Add support for multi resolution icons   (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| Index: chrome/browser/themes/browser_theme_pack.h | 
| diff --git a/chrome/browser/themes/browser_theme_pack.h b/chrome/browser/themes/browser_theme_pack.h | 
| index ed3d26ddaa6fdce7f6a1920cb8ba5c7bca753cbe..bb60f8a8835044f43b42fcd825c77f535709dec7 100644 | 
| --- a/chrome/browser/themes/browser_theme_pack.h | 
| +++ b/chrome/browser/themes/browser_theme_pack.h | 
| @@ -75,6 +75,10 @@ class BrowserThemePack : public base::RefCountedThreadSafe< | 
| // for making layout decisions in the interface. | 
| SkBitmap* GetBitmapNamed(int id) const; | 
| + // Get bitmaps for the given |id|. This can be used for icons rendered at | 
| + // multiple resolutions. | 
| + bool GetBitmapsNamed(int id, std::vector<SkBitmap*>& bitmaps) const; | 
| 
Nico
2011/04/14 18:28:54
Introduce a new class and have this return that. e
 
Robert Sesek
2011/04/14 18:42:44
If I'm understanding correctly, this is exactly wh
 | 
| + | 
| // Returns the raw PNG encoded data for IDR_THEME_NTP_*. This method is only | 
| // supposed to work for the NTP attribution and background resources. | 
| RefCountedMemory* GetRawData(int id) const; | 
| @@ -91,6 +95,7 @@ class BrowserThemePack : public base::RefCountedThreadSafe< | 
| // track of the pointers. We own these and will delete them when we're done | 
| // using them. | 
| typedef std::map<int, SkBitmap*> ImageCache; | 
| + typedef std::map<int, std::vector<SkBitmap*>* > MultiResImageCache; | 
| // The raw PNG memory associated with a certain id. | 
| typedef std::map<int, scoped_refptr<RefCountedMemory> > RawImages; | 
| @@ -226,7 +231,7 @@ class BrowserThemePack : public base::RefCountedThreadSafe< | 
| ImageCache prepared_images_; | 
| // Loaded images. These are loaded from |image_memory_| or the |data_pack_|. | 
| - mutable ImageCache loaded_images_; | 
| + mutable MultiResImageCache loaded_images_; | 
| DISALLOW_COPY_AND_ASSIGN(BrowserThemePack); | 
| }; |