Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(769)

Unified Diff: ui/gfx/image/image.h

Issue 10853018: Fall back to the default favicon on invalid favicon files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698