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/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "components/bookmarks/browser/bookmark_model_observer.h"
14 // Base class for a BookmarkModelObserver implementation. All mutations of the
15 // model funnel into the method BookmarkModelChanged.
16 class BaseBookmarkModelObserver
: public BookmarkModelObserver
{
18 BaseBookmarkModelObserver() {}
20 virtual void BookmarkModelChanged() = 0;
22 // BookmarkModelObserver:
23 void BookmarkModelLoaded(BookmarkModel
* model
, bool ids_reassigned
) override
;
24 void BookmarkModelBeingDeleted(BookmarkModel
* model
) override
;
25 void BookmarkNodeMoved(BookmarkModel
* model
,
26 const BookmarkNode
* old_parent
,
28 const BookmarkNode
* new_parent
,
29 int new_index
) override
;
30 void BookmarkNodeAdded(BookmarkModel
* model
,
31 const BookmarkNode
* parent
,
33 void BookmarkNodeRemoved(BookmarkModel
* model
,
34 const BookmarkNode
* parent
,
36 const BookmarkNode
* node
,
37 const std::set
<GURL
>& removed_urls
) override
;
38 void BookmarkAllUserNodesRemoved(BookmarkModel
* model
,
39 const std::set
<GURL
>& removed_urls
) override
;
40 void BookmarkNodeChanged(BookmarkModel
* model
,
41 const BookmarkNode
* node
) override
;
42 void BookmarkNodeFaviconChanged(BookmarkModel
* model
,
43 const BookmarkNode
* node
) override
;
44 void BookmarkNodeChildrenReordered(BookmarkModel
* model
,
45 const BookmarkNode
* node
) override
;
48 ~BaseBookmarkModelObserver() override
{}
51 DISALLOW_COPY_AND_ASSIGN(BaseBookmarkModelObserver
);
54 } // namespace bookmarks
56 #endif // COMPONENTS_BOOKMARKS_BROWSER_BASE_BOOKMARK_MODEL_OBSERVER_H_