| 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 #include "base/basictypes.h" |
| 11 |
| 10 class GURL; | 12 class GURL; |
| 11 | 13 |
| 12 namespace bookmarks { | 14 namespace bookmarks { |
| 13 | 15 |
| 14 class BookmarkModel; | 16 class BookmarkModel; |
| 15 class BookmarkNode; | 17 class BookmarkNode; |
| 16 | 18 |
| 17 // Observer for the BookmarkModel. | 19 // Observer for the BookmarkModel. |
| 18 class BookmarkModelObserver { | 20 class BookmarkModelObserver { |
| 19 public: | 21 public: |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 129 |
| 128 // Invoked before a set of model changes that is initiated by a single user | 130 // Invoked before a set of model changes that is initiated by a single user |
| 129 // action. For example, this is called a single time when pasting from the | 131 // action. For example, this is called a single time when pasting from the |
| 130 // clipboard before each pasted bookmark is added to the bookmark model. | 132 // clipboard before each pasted bookmark is added to the bookmark model. |
| 131 virtual void GroupedBookmarkChangesBeginning(BookmarkModel* model) {} | 133 virtual void GroupedBookmarkChangesBeginning(BookmarkModel* model) {} |
| 132 | 134 |
| 133 // Invoked after a set of model changes triggered by a single user action has | 135 // Invoked after a set of model changes triggered by a single user action has |
| 134 // ended. | 136 // ended. |
| 135 virtual void GroupedBookmarkChangesEnded(BookmarkModel* model) {} | 137 virtual void GroupedBookmarkChangesEnded(BookmarkModel* model) {} |
| 136 | 138 |
| 139 // Invoked after the bookmark deletion is undo-ed that caused a new bookmark |
| 140 // with new_id being created and cloned from the deleted bookmark with old_id. |
| 141 // This event is needed to support restoring other data that is associated |
| 142 // with bookmark but stored separately, like offline page data. |
| 143 // occurs. |
| 144 virtual void BookmarkNodeRenumbered( |
| 145 BookmarkModel* model, int64_t old_id, int64_t new_id) {} |
| 146 |
| 137 protected: | 147 protected: |
| 138 virtual ~BookmarkModelObserver() {} | 148 virtual ~BookmarkModelObserver() {} |
| 139 }; | 149 }; |
| 140 | 150 |
| 141 } // namespace bookmarks | 151 } // namespace bookmarks |
| 142 | 152 |
| 143 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_OBSERVER_H_ | 153 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_OBSERVER_H_ |
| OLD | NEW |