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 that are editable by the | 105 // Invoked when all non-permanent bookmark nodes have been removed. |
106 // user have been removed. | |
107 // |removed_urls| is populated with the urls which no longer have any | 106 // |removed_urls| is populated with the urls which no longer have any |
108 // bookmarks associated with them. | 107 // bookmarks associated with them. |
109 virtual void BookmarkAllNodesRemoved(BookmarkModel* model, | 108 virtual void BookmarkAllNodesRemoved(BookmarkModel* model, |
110 const std::set<GURL>& removed_urls) = 0; | 109 const std::set<GURL>& removed_urls) = 0; |
111 | 110 |
112 // Invoked before a set of model changes that is initiated by a single user | 111 // Invoked before a set of model changes that is initiated by a single user |
113 // action. For example, this is called a single time when pasting from the | 112 // action. For example, this is called a single time when pasting from the |
114 // clipboard before each pasted bookmark is added to the bookmark model. | 113 // clipboard before each pasted bookmark is added to the bookmark model. |
115 virtual void GroupedBookmarkChangesBeginning(BookmarkModel* model) {} | 114 virtual void GroupedBookmarkChangesBeginning(BookmarkModel* model) {} |
116 | 115 |
117 // Invoked after a set of model changes triggered by a single user action has | 116 // Invoked after a set of model changes triggered by a single user action has |
118 // ended. | 117 // ended. |
119 virtual void GroupedBookmarkChangesEnded(BookmarkModel* model) {} | 118 virtual void GroupedBookmarkChangesEnded(BookmarkModel* model) {} |
120 | 119 |
121 protected: | 120 protected: |
122 virtual ~BookmarkModelObserver() {} | 121 virtual ~BookmarkModelObserver() {} |
123 }; | 122 }; |
124 | 123 |
125 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_OBSERVER_H_ | 124 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_OBSERVER_H_ |
OLD | NEW |