Index: ui/gfx/image/image.h |
diff --git a/ui/gfx/image/image.h b/ui/gfx/image/image.h |
index c03db3ad18e783231e57e53712350e10e925f0c6..a780922a5102c2d2045d8ecceb6be843542dc7a5 100644 |
--- a/ui/gfx/image/image.h |
+++ b/ui/gfx/image/image.h |
@@ -36,6 +36,7 @@ class ImageMacTest; |
} |
namespace gfx { |
+class ImagePNG; |
Robert Sesek
2012/07/20 21:03:01
Remove
cjhopman
2012/07/24 01:44:13
Done.
|
class ImageSkia; |
class ImageSkiaRep; |
@@ -55,6 +56,7 @@ class UI_EXPORT Image { |
kImageRepCocoa, |
kImageRepCairo, |
kImageRepSkia, |
+ kImageRepPNG, |
}; |
typedef std::map<RepresentationType, internal::ImageRep*> RepresentationMap; |
@@ -62,6 +64,11 @@ 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 |
+ // representation. |
+ Image(const unsigned char* png, size_t input_size); |
+ explicit Image(const std::vector<unsigned char>& png); |
Robert Sesek
2012/07/20 21:03:01
I wonder if you even need this constructor. A clie
cjhopman
2012/07/24 01:44:13
Agreed. Done.
|
+ |
// Creates a new image by copying the ImageSkia for use as the default |
// representation. |
explicit Image(const ImageSkia& image); |
@@ -98,6 +105,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; |
Robert Sesek
2012/07/20 21:03:01
I'm wondering if this should return a const ref. R
cjhopman
2012/07/24 01:44:13
I think my preference would be to keep it consiste
Robert Sesek
2012/07/24 18:59:17
Agree. Let's keep these as pointers.
|
const SkBitmap* ToSkBitmap() const; |
const ImageSkia* ToImageSkia() const; |
#if defined(TOOLKIT_GTK) |
@@ -113,6 +121,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) |