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

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

Issue 7076027: Couple more wrench menu issues. The patch I sent around a couple of (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Makes unit test compile Created 9 years, 7 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/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 2fa2125625953c14c7827f201e6ee12630f670bc..f3438bb69db8cfc8796356179adf658da0327350 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc
@@ -226,13 +226,17 @@ bool BookmarkMenuDelegate::ShowContextMenu(MenuItemView* source,
DCHECK(menu_id_to_node_map_.find(id) != menu_id_to_node_map_.end());
std::vector<const BookmarkNode*> nodes;
nodes.push_back(menu_id_to_node_map_[id]);
+ bool close_on_delete = !parent_menu_item_ &&
+ (nodes[0]->parent() == profile()->GetBookmarkModel()->other_node() &&
+ nodes[0]->parent()->child_count() == 1);
context_menu_.reset(
new BookmarkContextMenu(
parent_,
profile_,
page_navigator_,
nodes[0]->parent(),
- nodes));
+ nodes,
+ close_on_delete));
context_menu_->set_observer(this);
context_menu_->RunMenuAt(p);
context_menu_.reset(NULL);
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc ('k') | chrome/browser/ui/views/wrench_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698