| 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; |
| 11 class BookmarkNode; | 11 class BookmarkNode; |
| 12 class GURL; | 12 class GURL; |
| 13 | 13 |
| 14 namespace bookmarks { |
| 15 |
| 14 // Observer for the BookmarkModel. | 16 // Observer for the BookmarkModel. |
| 15 class BookmarkModelObserver { | 17 class BookmarkModelObserver { |
| 16 public: | 18 public: |
| 17 // Invoked when the model has finished loading. |ids_reassigned| mirrors | 19 // Invoked when the model has finished loading. |ids_reassigned| mirrors |
| 18 // that of BookmarkLoadDetails::ids_reassigned. See it for details. | 20 // that of BookmarkLoadDetails::ids_reassigned. See it for details. |
| 19 virtual void BookmarkModelLoaded(BookmarkModel* model, | 21 virtual void BookmarkModelLoaded(BookmarkModel* model, |
| 20 bool ids_reassigned) = 0; | 22 bool ids_reassigned) = 0; |
| 21 | 23 |
| 22 // Invoked from the destructor of the BookmarkModel. | 24 // Invoked from the destructor of the BookmarkModel. |
| 23 virtual void BookmarkModelBeingDeleted(BookmarkModel* model) {} | 25 virtual void BookmarkModelBeingDeleted(BookmarkModel* model) {} |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 virtual void GroupedBookmarkChangesBeginning(BookmarkModel* model) {} | 130 virtual void GroupedBookmarkChangesBeginning(BookmarkModel* model) {} |
| 129 | 131 |
| 130 // Invoked after a set of model changes triggered by a single user action has | 132 // Invoked after a set of model changes triggered by a single user action has |
| 131 // ended. | 133 // ended. |
| 132 virtual void GroupedBookmarkChangesEnded(BookmarkModel* model) {} | 134 virtual void GroupedBookmarkChangesEnded(BookmarkModel* model) {} |
| 133 | 135 |
| 134 protected: | 136 protected: |
| 135 virtual ~BookmarkModelObserver() {} | 137 virtual ~BookmarkModelObserver() {} |
| 136 }; | 138 }; |
| 137 | 139 |
| 140 } // namespace bookmarks |
| 141 |
| 138 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_OBSERVER_H_ | 142 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_OBSERVER_H_ |
| OLD | NEW |