summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bookmarks/bookmark_model.h
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 00:22:01 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 00:22:01 +0000
commite2f86d9313ffcdd815e2828f9c0cbf16728d74be (patch)
tree7f36ab3693ce0e9cd64f1329d811dcf99bbd0590 /chrome/browser/bookmarks/bookmark_model.h
parent938cc1c0e38e21c3dfcbf21527c3d41349e86519 (diff)
downloadchromium_src-e2f86d9313ffcdd815e2828f9c0cbf16728d74be.zip
chromium_src-e2f86d9313ffcdd815e2828f9c0cbf16728d74be.tar.gz
chromium_src-e2f86d9313ffcdd815e2828f9c0cbf16728d74be.tar.bz2
Adds ability to sort the children of a node in the bookmark model. I
plan on doing this in chunks, next phase is updating observers, then changing the bookmark manager to call into the new method. BUG=1750 TEST=none yet Review URL: http://codereview.chromium.org/27082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10313 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks/bookmark_model.h')
-rw-r--r--chrome/browser/bookmarks/bookmark_model.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/bookmarks/bookmark_model.h b/chrome/browser/bookmarks/bookmark_model.h
index 52cbe46..a886725 100644
--- a/chrome/browser/bookmarks/bookmark_model.h
+++ b/chrome/browser/bookmarks/bookmark_model.h
@@ -169,6 +169,12 @@ class BookmarkModelObserver {
// 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 @@ class BookmarkModel : public NotificationObserver, public BookmarkService {
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.