OLD | NEW |
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 virtual void ExtensiveBookmarkChangesBeginning(BookmarkModel* model) {} | 95 virtual void ExtensiveBookmarkChangesBeginning(BookmarkModel* model) {} |
96 | 96 |
97 // Invoked after an extensive set of model changes has ended. | 97 // Invoked after an extensive set of model changes has ended. |
98 // This tells observers to update themselves if they were waiting for the | 98 // This tells observers to update themselves if they were waiting for the |
99 // update to finish. | 99 // update to finish. |
100 virtual void ExtensiveBookmarkChangesEnded(BookmarkModel* model) {} | 100 virtual void ExtensiveBookmarkChangesEnded(BookmarkModel* model) {} |
101 | 101 |
102 // Invoked before all non-permanent bookmark nodes are removed. | 102 // Invoked before all non-permanent bookmark nodes are removed. |
103 virtual void OnWillRemoveAllBookmarks(BookmarkModel* model) {} | 103 virtual void OnWillRemoveAllBookmarks(BookmarkModel* model) {} |
104 | 104 |
105 // Invoked when all non-permanent bookmark nodes have been removed. | 105 // Invoked when all non-permanent bookmark nodes that are editable by the |
| 106 // user have been removed. |
106 // |removed_urls| is populated with the urls which no longer have any | 107 // |removed_urls| is populated with the urls which no longer have any |
107 // bookmarks associated with them. | 108 // bookmarks associated with them. |
108 virtual void BookmarkAllNodesRemoved(BookmarkModel* model, | 109 virtual void BookmarkAllNodesRemoved(BookmarkModel* model, |
109 const std::set<GURL>& removed_urls) = 0; | 110 const std::set<GURL>& removed_urls) = 0; |
110 | 111 |
111 // Invoked before a set of model changes that is initiated by a single user | 112 // Invoked before a set of model changes that is initiated by a single user |
112 // action. For example, this is called a single time when pasting from the | 113 // action. For example, this is called a single time when pasting from the |
113 // clipboard before each pasted bookmark is added to the bookmark model. | 114 // clipboard before each pasted bookmark is added to the bookmark model. |
114 virtual void GroupedBookmarkChangesBeginning(BookmarkModel* model) {} | 115 virtual void GroupedBookmarkChangesBeginning(BookmarkModel* model) {} |
115 | 116 |
116 // Invoked after a set of model changes triggered by a single user action has | 117 // Invoked after a set of model changes triggered by a single user action has |
117 // ended. | 118 // ended. |
118 virtual void GroupedBookmarkChangesEnded(BookmarkModel* model) {} | 119 virtual void GroupedBookmarkChangesEnded(BookmarkModel* model) {} |
119 | 120 |
120 protected: | 121 protected: |
121 virtual ~BookmarkModelObserver() {} | 122 virtual ~BookmarkModelObserver() {} |
122 }; | 123 }; |
123 | 124 |
124 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_OBSERVER_H_ | 125 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_OBSERVER_H_ |
OLD | NEW |