Index: ui/gfx/image/image.h |
diff --git a/ui/gfx/image/image.h b/ui/gfx/image/image.h |
index 04a79daffec0673be643d72e04bf7a53e760f501..b643362fcf06376c34705ca94b12f1593feb9c6f 100644 |
--- a/ui/gfx/image/image.h |
+++ b/ui/gfx/image/image.h |
@@ -97,7 +97,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. |
+ // the Image. Must only be called if IsEmpty() is false. |
const SkBitmap* ToSkBitmap() const; |
const ImageSkia* ToImageSkia() const; |
#if defined(TOOLKIT_GTK) |
@@ -110,10 +110,15 @@ class UI_EXPORT Image { |
// Same as ToSkBitmap(), but returns a null SkBitmap if this image is empty. |
SkBitmap AsBitmap() const; |
- // Same as ToSkBitmap(), but returns a ImageSkia with a null SkBitmap if this |
+ // Same as ToImageSkia(), but returns an empty ImageSkia if this |
// image is empty. |
ImageSkia AsImageSkia() const; |
+#if defined(OS_MACOSX) |
+ // Same as ToSkBitmap(), but returns nil if this image is empty. |
+ NSImage* AsNSImage() const; |
+#endif |
+ |
// Performs a conversion, like above, but returns a copy of the result rather |
// than a weak pointer. The caller is responsible for deleting the result. |
// Note that the result is only a copy in terms of memory management; the |