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

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

Issue 10837090: Change return type of FaviconTabHelper::GetFavicon() to gfx::Image. (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
« no previous file with comments | « ui/gfx/image/image.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image.cc
diff --git a/ui/gfx/image/image.cc b/ui/gfx/image/image.cc
index ea302ab58a6297a3a9a9861d93be30ab5c29698a..9854787733b7cf9029de07fec2ffb50081d147b3 100644
--- a/ui/gfx/image/image.cc
+++ b/ui/gfx/image/image.cc
@@ -337,6 +337,14 @@ NSImage* Image::ToNSImage() const {
}
#endif
+SkBitmap Image::AsBitmap() const {
+ return IsEmpty() ? SkBitmap() : *ToSkBitmap();
+}
+
+ImageSkia Image::AsImageSkia() const {
+ return IsEmpty() ? ImageSkia(SkBitmap()) : *ToImageSkia();
+}
+
ImageSkia* Image::CopyImageSkia() const {
return new ImageSkia(*ToImageSkia());
}
« no previous file with comments | « ui/gfx/image/image.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698