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

Unified Diff: chrome/browser/views/bookmark_bar_view.cc

Issue 27262: Wires up sorting of bookmarks to the 'organize menu' in the bookmark... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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/views/bookmark_bar_view.cc
===================================================================
--- chrome/browser/views/bookmark_bar_view.cc (revision 10579)
+++ chrome/browser/views/bookmark_bar_view.cc (working copy)
@@ -1329,6 +1329,27 @@
}
}
+void BookmarkBarView::BookmarkNodeChildrenReordered(BookmarkModel* model,
+ BookmarkNode* node) {
ncarter (slow) 2009/02/27 21:22:34 Please confirm that it's OK to not worry about the
sky 2009/02/27 21:42:06 I added a stop, but no start with a description of
+ NotifyModelChanged();
+ if (node != model_->GetBookmarkBarNode())
+ return; // We only care about reordering of the bookmark bar node.
+
+ // Remove the existing buttons.
+ while (GetBookmarkButtonCount()) {
+ views::View* button = GetChildViewAt(0);
+ RemoveChildView(button);
+ MessageLoop::current()->DeleteSoon(FROM_HERE, button);
+ }
+
+ // Create the new buttons.
+ for (int i = 0; i < node->GetChildCount(); ++i)
+ AddChildView(i, CreateBookmarkButton(node->GetChild(i)));
+
+ Layout();
+ SchedulePaint();
+}
+
void BookmarkBarView::BookmarkNodeFavIconLoaded(BookmarkModel* model,
BookmarkNode* node) {
if (menu_runner_.get())

Powered by Google App Engine
This is Rietveld 408576698