• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2009 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.
4 
5 #ifndef CHROME_BROWSER_BOOKMARKS_BASE_BOOKMARK_MODEL_OBSERVER_H_
6 #define CHROME_BROWSER_BOOKMARKS_BASE_BOOKMARK_MODEL_OBSERVER_H_
7 #pragma once
8 
9 #include "base/basictypes.h"
10 #include "chrome/browser/bookmarks/bookmark_model_observer.h"
11 
12 // Base class for a BookmarkModelObserver implementation. All mutations of the
13 // model funnel into the method BookmarkModelChanged.
14 class BaseBookmarkModelObserver : public BookmarkModelObserver {
15  public:
BaseBookmarkModelObserver()16   BaseBookmarkModelObserver() {}
~BaseBookmarkModelObserver()17   virtual ~BaseBookmarkModelObserver() {}
18 
19   virtual void BookmarkModelChanged() = 0;
20 
21   virtual void Loaded(BookmarkModel* model);
22 
23   virtual void BookmarkModelBeingDeleted(BookmarkModel* model);
24   virtual void BookmarkNodeMoved(BookmarkModel* model,
25                                  const BookmarkNode* old_parent,
26                                  int old_index,
27                                  const BookmarkNode* new_parent,
28                                  int new_index);
29   virtual void BookmarkNodeAdded(BookmarkModel* model,
30                                  const BookmarkNode* parent,
31                                  int index);
32   virtual void BookmarkNodeRemoved(BookmarkModel* model,
33                                    const BookmarkNode* parent,
34                                    int old_index,
35                                    const BookmarkNode* node);
36   virtual void BookmarkNodeChanged(BookmarkModel* model,
37                                    const BookmarkNode* node);
38   virtual void BookmarkNodeFaviconLoaded(BookmarkModel* model,
39                                          const BookmarkNode* node);
40   virtual void BookmarkNodeChildrenReordered(BookmarkModel* model,
41                                              const BookmarkNode* node);
42 
43  private:
44   DISALLOW_COPY_AND_ASSIGN(BaseBookmarkModelObserver);
45 };
46 
47 #endif  // CHROME_BROWSER_BOOKMARKS_BASE_BOOKMARK_MODEL_OBSERVER_H_
48