Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Side by Side Diff: components/bookmarks/browser/bookmark_model_observer.h

Issue 338593002: Set metainfo ID for enhanced bookmarks extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: address comments Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_OBSERVER_H_ 5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_OBSERVER_H_
6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_OBSERVER_H_ 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_OBSERVER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 class BookmarkModel; 10 class BookmarkModel;
(...skipping 11 matching lines...) Expand all
22 // Invoked from the destructor of the BookmarkModel. 22 // Invoked from the destructor of the BookmarkModel.
23 virtual void BookmarkModelBeingDeleted(BookmarkModel* model) {} 23 virtual void BookmarkModelBeingDeleted(BookmarkModel* model) {}
24 24
25 // Invoked when a node has moved. 25 // Invoked when a node has moved.
26 virtual void BookmarkNodeMoved(BookmarkModel* model, 26 virtual void BookmarkNodeMoved(BookmarkModel* model,
27 const BookmarkNode* old_parent, 27 const BookmarkNode* old_parent,
28 int old_index, 28 int old_index,
29 const BookmarkNode* new_parent, 29 const BookmarkNode* new_parent,
30 int new_index) = 0; 30 int new_index) = 0;
31 31
32 // Invoked prior to adding a bookmark node, and in particular, prior to adding
33 // it to the parent. This function can be used to alter the contents of the
34 // node before BookmarkNodeAdded listeners know about it.
35 virtual void OnWillAddBookmarkNode(BookmarkModel* model,
sky 2014/06/16 14:57:22 Add test coverage of this.
Mike Wittman 2014/06/16 18:47:58 Done.
36 BookmarkNode* node) {}
37
32 // Invoked when a node has been added. 38 // Invoked when a node has been added.
33 virtual void BookmarkNodeAdded(BookmarkModel* model, 39 virtual void BookmarkNodeAdded(BookmarkModel* model,
34 const BookmarkNode* parent, 40 const BookmarkNode* parent,
35 int index) = 0; 41 int index) = 0;
36 42
37 // Invoked before a node is removed. 43 // Invoked before a node is removed.
38 // |parent| the parent of the node that will be removed. 44 // |parent| the parent of the node that will be removed.
39 // |old_index| the index of the node about to be removed in |parent|. 45 // |old_index| the index of the node about to be removed in |parent|.
40 // |node| is the node to be removed. 46 // |node| is the node to be removed.
41 virtual void OnWillRemoveBookmarks(BookmarkModel* model, 47 virtual void OnWillRemoveBookmarks(BookmarkModel* model,
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 130
125 // Invoked after a set of model changes triggered by a single user action has 131 // Invoked after a set of model changes triggered by a single user action has
126 // ended. 132 // ended.
127 virtual void GroupedBookmarkChangesEnded(BookmarkModel* model) {} 133 virtual void GroupedBookmarkChangesEnded(BookmarkModel* model) {}
128 134
129 protected: 135 protected:
130 virtual ~BookmarkModelObserver() {} 136 virtual ~BookmarkModelObserver() {}
131 }; 137 };
132 138
133 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_OBSERVER_H_ 139 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698