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>2008-10-23 16:47:41 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-23 16:47:41 +0000
commit776e749879084abf997bed1838737fd0f8bd5a20 (patch)
treead594c86d14afa848c1fe34e6d3d44559363fd6e /chrome/browser/bookmarks/bookmark_model.h
parent4b2170afea2d38cd98c7ea0e25a5c45151f7471e (diff)
downloadchromium_src-776e749879084abf997bed1838737fd0f8bd5a20.zip
chromium_src-776e749879084abf997bed1838737fd0f8bd5a20.tar.gz
chromium_src-776e749879084abf997bed1838737fd0f8bd5a20.tar.bz2
Adds models needed by the bookmark manager. Specifically a
BookmarkTableModel, which will be used to show one of the following: the children of a folder, recently bookmarked or the results of a search. And the tree model implementation that shows the folders. BUG=674 TEST=covered by unit tests Review URL: http://codereview.chromium.org/8063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3814 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks/bookmark_model.h')
-rw-r--r--chrome/browser/bookmarks/bookmark_model.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/bookmarks/bookmark_model.h b/chrome/browser/bookmarks/bookmark_model.h
index d9f47ac..2f3f32d 100644
--- a/chrome/browser/bookmarks/bookmark_model.h
+++ b/chrome/browser/bookmarks/bookmark_model.h
@@ -147,9 +147,16 @@ class BookmarkModelObserver {
int index) = 0;
// Invoked when a node has been removed, the item may still be starred though.
+ // TODO(sky): merge these two into one.
virtual void BookmarkNodeRemoved(BookmarkModel* model,
BookmarkNode* parent,
- int index) = 0;
+ int index) {}
+ virtual void BookmarkNodeRemoved(BookmarkModel* model,
+ BookmarkNode* parent,
+ int old_index,
+ BookmarkNode* node) {
+ BookmarkNodeRemoved(model, parent, old_index);
+ }
// Invoked when the title or favicon of a node has changed.
virtual void BookmarkNodeChanged(BookmarkModel* model,
@@ -222,6 +229,10 @@ class BookmarkModel : public NotificationObserver, public BookmarkService {
size_t max_count,
std::vector<TitleMatch>* matches);
+ // Returns true if the specified bookmark's title matches the specified
+ // text.
+ bool DoesBookmarkMatchText(const std::wstring& text, BookmarkNode* node);
+
void AddObserver(BookmarkModelObserver* observer) {
observers_.AddObserver(observer);
}