Popular sites on the NTP: Try to keep the ordering constant
[chromium-blink-merge.git] / components / bookmarks / browser / base_bookmark_model_observer.h
blob14a184ef7771d1526347d210b06606cc6d3a235f
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"
11 namespace bookmarks {
13 // Base class for a BookmarkModelObserver implementation. All mutations of the
14 // model funnel into the method BookmarkModelChanged.
15 class BaseBookmarkModelObserver : public BookmarkModelObserver {
16 public:
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,
26 int old_index,
27 const BookmarkNode* new_parent,
28 int new_index) override;
29 void BookmarkNodeAdded(BookmarkModel* model,
30 const BookmarkNode* parent,
31 int index) override;
32 void BookmarkNodeRemoved(BookmarkModel* model,
33 const BookmarkNode* parent,
34 int old_index,
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;
46 protected:
47 ~BaseBookmarkModelObserver() override {}
49 private:
50 DISALLOW_COPY_AND_ASSIGN(BaseBookmarkModelObserver);
53 } // namespace bookmarks
55 #endif // COMPONENTS_BOOKMARKS_BROWSER_BASE_BOOKMARK_MODEL_OBSERVER_H_