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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc

Issue 328363003: Use the managed bookmarks icon for its folder in views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 years, 6 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 | « chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc b/chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc
index d3a20fc7bd77fa27c2b380bbb45dffa3a87ee625..139434fc9b9bd782de5c57c83c9c9828f6974910 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc
@@ -441,14 +441,15 @@ void BookmarkMenuDelegate::BuildMenusForPermanentNodes(
int* next_menu_id) {
BookmarkModel* model = GetBookmarkModel();
bool added_separator = false;
- BuildMenuForPermanentNode(model->other_node(), menu, next_menu_id,
- &added_separator);
- BuildMenuForPermanentNode(model->mobile_node(), menu, next_menu_id,
- &added_separator);
+ BuildMenuForPermanentNode(model->other_node(), IDR_BOOKMARK_BAR_FOLDER, menu,
+ next_menu_id, &added_separator);
+ BuildMenuForPermanentNode(model->mobile_node(), IDR_BOOKMARK_BAR_FOLDER, menu,
+ next_menu_id, &added_separator);
}
void BookmarkMenuDelegate::BuildMenuForPermanentNode(
const BookmarkNode* node,
+ int icon_resource_id,
MenuItemView* menu,
int* next_menu_id,
bool* added_separator) {
@@ -467,7 +468,7 @@ void BookmarkMenuDelegate::BuildMenuForPermanentNode(
}
ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
- gfx::ImageSkia* folder_icon = rb->GetImageSkiaNamed(IDR_BOOKMARK_BAR_FOLDER);
+ gfx::ImageSkia* folder_icon = rb->GetImageSkiaNamed(icon_resource_id);
MenuItemView* submenu = menu->AppendSubMenuWithIcon(
id, node->GetTitle(), *folder_icon);
BuildMenu(node, 0, submenu, next_menu_id);
@@ -480,9 +481,8 @@ void BookmarkMenuDelegate::BuildMenuForManagedNode(
// Don't add a separator for this menu.
bool added_separator = true;
const BookmarkNode* node = GetChromeBookmarkClient()->managed_node();
- // TODO(joaodasilva): use the "managed bookmark folder" icon here.
- // http://crbug.com/49598
- BuildMenuForPermanentNode(node, menu, next_menu_id, &added_separator);
+ BuildMenuForPermanentNode(node, IDR_BOOKMARK_BAR_FOLDER_MANAGED, menu,
+ next_menu_id, &added_separator);
}
void BookmarkMenuDelegate::BuildMenu(const BookmarkNode* parent,
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698