 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: ui/gfx/image.h | 
| diff --git a/ui/gfx/image.h b/ui/gfx/image.h | 
| index fddf4da27eb98ca4f11a95dd90b59a8125c9ff9f..0897bae434f69f51f195c67d980ecbb24d110af1 100644 | 
| --- a/ui/gfx/image.h | 
| +++ b/ui/gfx/image.h | 
| @@ -15,6 +15,7 @@ | 
| #pragma once | 
| #include <map> | 
| +#include <vector> | 
| #include "base/basictypes.h" | 
| #include "base/gtest_prod_util.h" | 
| @@ -44,11 +45,18 @@ class Image { | 
| // Creates a new image with the default representation. The object will take | 
| // ownership of the image. | 
| explicit Image(const SkBitmap* bitmap); | 
| + // To create an Image that supports multiple resolutions pass a vector | 
| + // of bitmaps, one for each resolution. | 
| + explicit Image(const std::vector<const SkBitmap*>& bitmaps); | 
| + | 
| #if defined(OS_LINUX) | 
| // Does not increase |pixbuf|'s reference count; expects to take ownership. | 
| + // TODO Add support for multiple resolutions when necessary. | 
| explicit Image(GdkPixbuf* pixbuf); | 
| #elif defined(OS_MACOSX) | 
| // Does not retain |image|; expects to take ownership. | 
| + // A single NSImage object can contain multiple bitmaps so there's no reason | 
| + // to pass a vector of these. | 
| explicit Image(NSImage* image); | 
| #endif | 
| @@ -64,6 +72,9 @@ class Image { | 
| operator NSImage*(); | 
| #endif | 
| + size_t GetNumberOfSkBitmaps(); | 
| 
Robert Sesek
2011/04/15 20:27:20
I'm not in love with this interface. It's not real
 
sail
2011/04/16 01:25:00
I agree the name sucks. It'll be supper easy to ch
 | 
| + const SkBitmap* GetSkBitmapAtIndex(size_t index); | 
| + | 
| // Inspects the representations map to see if the given type exists. | 
| bool HasRepresentation(RepresentationType type); |