Chromium Code Reviews| Index: ui/gfx/image/image.h |
| diff --git a/ui/gfx/image/image.h b/ui/gfx/image/image.h |
| index c03db3ad18e783231e57e53712350e10e925f0c6..da3ff0090db0e38952ef28e22824eb959c087edd 100644 |
| --- a/ui/gfx/image/image.h |
| +++ b/ui/gfx/image/image.h |
| @@ -55,6 +55,7 @@ class UI_EXPORT Image { |
| kImageRepCocoa, |
| kImageRepCairo, |
| kImageRepSkia, |
| + kImageRepPNG, |
| }; |
| typedef std::map<RepresentationType, internal::ImageRep*> RepresentationMap; |
| @@ -62,6 +63,10 @@ class UI_EXPORT Image { |
| // Creates an empty image with no representations. |
| Image(); |
| + // Creates a new image by copying the png-encoded input for use as the default |
|
Robert Sesek
2012/07/24 18:59:17
nit: PNG
Also add a note about how to create this
cjhopman
2012/07/25 21:13:29
Done.
|
| + // representation. |
| + Image(const unsigned char* png, size_t input_size); |
| + |
| // Creates a new image by copying the ImageSkia for use as the default |
| // representation. |
| explicit Image(const ImageSkia& image); |
| @@ -98,6 +103,7 @@ class UI_EXPORT Image { |
| // Converts the Image to the desired representation and stores it internally. |
| // The returned result is a weak pointer owned by and scoped to the life of |
| // the Image. |
| + const std::vector<unsigned char>* ToImagePNG() const; |
| const SkBitmap* ToSkBitmap() const; |
| const ImageSkia* ToImageSkia() const; |
| #if defined(TOOLKIT_GTK) |
| @@ -113,6 +119,7 @@ class UI_EXPORT Image { |
| // backing pixels are shared amongst all copies (a fact of each of the |
| // converted representations, rather than a limitation imposed by Image) and |
| // so the result should be considered immutable. |
| + std::vector<unsigned char>* CopyImagePNG() const; |
| ImageSkia* CopyImageSkia() const; |
| SkBitmap* CopySkBitmap() const; |
| #if defined(TOOLKIT_GTK) |