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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm

Issue 10834368: Convert mostly favicon related code from SkBitmap to ImageSkia and 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
Index: chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm b/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
index 61c8fc10f46f3df58b6bd3dbc508bc39ef9b418b..7bca0f3a799771293a6b5aa75c52bf4e0d5f9c7b 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
@@ -14,10 +14,9 @@
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
-#include "skia/ext/skia_utils_mac.h"
#import "third_party/mozilla/NSPasteboard+Utils.h"
-#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/l10n/l10n_util_mac.h"
+#include "ui/gfx/image/image.h"
using content::NavigationController;
using content::NavigationEntry;
@@ -65,9 +64,8 @@ NSPasteboard* LocationIconDecoration::GetDragPasteboard() {
}
NSImage* LocationIconDecoration::GetDragImage() {
- const SkBitmap& favicon = owner_->GetFavicon();
- NSImage* iconImage = (!favicon.isNull()) ?
- gfx::SkBitmapToNSImage(favicon) : GetImage();
+ NSImage* favicon = owner_->GetFavicon().AsNSImage();
+ NSImage* iconImage = favicon ? favicon : GetImage();
NSImage* image = bookmark_pasteboard_helper_mac::DragImageForBookmark(
iconImage, owner_->GetTitle());
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm ('k') | chrome/browser/ui/gtk/browser_titlebar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698