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

Unified Diff: chrome/browser/bookmarks/bookmark_model.h

Issue 27082: Adds ability to sort the children of a node in the bookmark model. I... (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
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_model.h
===================================================================
--- chrome/browser/bookmarks/bookmark_model.h (revision 10251)
+++ chrome/browser/bookmarks/bookmark_model.h (working copy)
@@ -169,6 +169,12 @@
// Invoked when a favicon has finished loading.
virtual void BookmarkNodeFavIconLoaded(BookmarkModel* model,
BookmarkNode* node) = 0;
+
+ // Invoked when the children (just direct children, not descendants) of
+ // |node| have been reordered in some way, such as sorted.
+ // TODO(sky): make this pure virtual when all observers have been updated.
+ virtual void BookmarkNodeChildrenReordered(BookmarkModel* model,
+ BookmarkNode* node) {}
};
// BookmarkModel --------------------------------------------------------------
@@ -270,6 +276,10 @@
const GURL& url,
const base::Time& creation_time);
+ // Sorts the children of |parent|, notifying observers by way of the
+ // BookmarkNodeChildrenReordered method.
+ void SortChildren(BookmarkNode* parent);
+
// This is the convenience that makes sure the url is starred or not starred.
// If is_starred is false, all bookmarks for URL are removed. If is_starred is
// true and there are no bookmarks for url, a bookmark is created.
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698