diff options
Diffstat (limited to 'chrome/browser/bookmarks/bookmark_model.h')
-rw-r--r-- | chrome/browser/bookmarks/bookmark_model.h | 10 |
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. |