1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BASE_BOOKMARK_MODEL_OBSERVER_H_
6 #define COMPONENTS_BOOKMARKS_BROWSER_BASE_BOOKMARK_MODEL_OBSERVER_H_
8 #include "base/macros.h"
9 #include "components/bookmarks/browser/bookmark_model_observer.h"
13 // Base class for a BookmarkModelObserver implementation. All mutations of the
14 // model funnel into the method BookmarkModelChanged.
15 class BaseBookmarkModelObserver
: public BookmarkModelObserver
{
17 BaseBookmarkModelObserver() {}
19 virtual void BookmarkModelChanged() = 0;
21 // BookmarkModelObserver:
22 void BookmarkModelLoaded(BookmarkModel
* model
, bool ids_reassigned
) override
;
23 void BookmarkModelBeingDeleted(BookmarkModel
* model
) override
;
24 void BookmarkNodeMoved(BookmarkModel
* model
,
25 const BookmarkNode
* old_parent
,
27 const BookmarkNode
* new_parent
,
28 int new_index
) override
;
29 void BookmarkNodeAdded(BookmarkModel
* model
,
30 const BookmarkNode
* parent
,
32 void BookmarkNodeRemoved(BookmarkModel
* model
,
33 const BookmarkNode
* parent
,
35 const BookmarkNode
* node
,
36 const std::set
<GURL
>& removed_urls
) override
;
37 void BookmarkAllUserNodesRemoved(BookmarkModel
* model
,
38 const std::set
<GURL
>& removed_urls
) override
;
39 void BookmarkNodeChanged(BookmarkModel
* model
,
40 const BookmarkNode
* node
) override
;
41 void BookmarkNodeFaviconChanged(BookmarkModel
* model
,
42 const BookmarkNode
* node
) override
;
43 void BookmarkNodeChildrenReordered(BookmarkModel
* model
,
44 const BookmarkNode
* node
) override
;
47 ~BaseBookmarkModelObserver() override
{}
50 DISALLOW_COPY_AND_ASSIGN(BaseBookmarkModelObserver
);
53 } // namespace bookmarks
55 #endif // COMPONENTS_BOOKMARKS_BROWSER_BASE_BOOKMARK_MODEL_OBSERVER_H_