diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 04:00:04 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 04:00:04 +0000 |
commit | d3e4400cfa37614dea465f711bb3ba7cef6b1bb8 (patch) | |
tree | ded8179e31c49acbb712c53b33b9ddb9adb8dc70 /chrome/browser/cocoa/bookmark_bar_controller.mm | |
parent | be4948cac077b9ff040edf84d1de0a78f4080b01 (diff) | |
download | chromium_src-d3e4400cfa37614dea465f711bb3ba7cef6b1bb8.zip chromium_src-d3e4400cfa37614dea465f711bb3ba7cef6b1bb8.tar.gz chromium_src-d3e4400cfa37614dea465f711bb3ba7cef6b1bb8.tar.bz2 |
[Mac] Add favicons to items in folders on the bookmark bar.
BUG=22601
TEST=Add folder to bookmark bar, bookmark a page in that folder, see icon when you open the menu.
Review URL: http://codereview.chromium.org/210029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26792 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_bar_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/bookmark_bar_controller.mm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_controller.mm b/chrome/browser/cocoa/bookmark_bar_controller.mm index 422fc8f..457138e 100644 --- a/chrome/browser/cocoa/bookmark_bar_controller.mm +++ b/chrome/browser/cocoa/bookmark_bar_controller.mm @@ -250,7 +250,13 @@ const CGFloat kBookmarkHorizontalPadding = 1.0; base::SysWideToNSString(child->GetTitle()), url_string.c_str()]; [item setToolTip:tooltip]; - + const SkBitmap& favicon = bookmarkModel_->GetFavIcon(child); + if (!favicon.isNull()) { + NSImage* image = gfx::SkBitmapToNSImage(favicon); + if (image) { + [item setImage:image]; + } + } } } |