Chromium Code Reviews| Index: components/reading_list/ios/reading_list_model_observer.h |
| diff --git a/components/reading_list/ios/reading_list_model_observer.h b/components/reading_list/ios/reading_list_model_observer.h |
| index 056f2cff64815e078bed813fdaf6d042544e357f..e1829521dc08c95affe8fdff02ea9b60e442aa1c 100644 |
| --- a/components/reading_list/ios/reading_list_model_observer.h |
| +++ b/components/reading_list/ios/reading_list_model_observer.h |
| @@ -8,6 +8,7 @@ |
| #include <set> |
| #include <vector> |
| +class GURL; |
| class ReadingListModel; |
| class ReadingListEntry; |
| @@ -36,39 +37,45 @@ class ReadingListModelObserver { |
| virtual void ReadingListModelBeingDeleted(const ReadingListModel* model) {} |
| // Invoked when elements are about to be removed from the read or unread list. |
| - virtual void ReadingListWillRemoveUnreadEntry(const ReadingListModel* model, |
| - size_t index) {} |
| - virtual void ReadingListWillRemoveReadEntry(const ReadingListModel* model, |
| - size_t index) {} |
| + virtual void ReadingListWillRemoveEntry(const ReadingListModel* model, |
| + const GURL& url) {} |
| // Invoked when elements are moved from unread to read or from read to unread. |
| // |index| is the original position and |read| the origin status. The element |
|
gambard
2016/11/29 10:09:23
|index| does not exist anymore. Update comment.
Olivier
2016/11/30 09:15:22
Done.
|
| // will change list and/or index but will not be deleted. |
| virtual void ReadingListWillMoveEntry(const ReadingListModel* model, |
| - size_t index, |
| - bool read) {} |
| - |
| - // Invoked when elements are added to the read or the unread list. The new |
| - // entries are always added at the beginning. these methods may be called |
| - // multiple time (to process changes coming from a synchronization for |
| - // example) and they will be executed in call order, the last call will end up |
| - // in first position. |
| - virtual void ReadingListWillAddUnreadEntry(const ReadingListModel* model, |
| - const ReadingListEntry& entry) {} |
| + const GURL& url) {} |
| - virtual void ReadingListWillAddReadEntry(const ReadingListModel* model, |
| - const ReadingListEntry& entry) {} |
| + // Invoked when elements are added to the read or the unread list. |
|
gambard
2016/11/29 10:09:23
Update comments, "read or the unread list" is not
Olivier
2016/11/30 09:15:22
Done.
|
| + virtual void ReadingListWillAddEntry(const ReadingListModel* model, |
| + const ReadingListEntry& entry) {} |
| + |
| + // Invoked when elements have been added to the read or the unread list. This |
|
gambard
2016/11/29 10:09:23
Same as above.
Olivier
2016/11/30 09:15:22
Done.
|
| + // method is called the |
|
gambard
2016/11/29 10:09:23
sentence cut in the middle.
Olivier
2016/11/30 09:15:22
Done.
|
| + virtual void ReadingListDidAddEntry(const ReadingListModel* model, |
| + const GURL& url) {} |
| // Invoked when an entry is about to change. |
| - virtual void ReadingListWillUpdateUnreadEntry(const ReadingListModel* model, |
| - size_t index) {} |
| - virtual void ReadingListWillUpdateReadEntry(const ReadingListModel* model, |
| - size_t index) {} |
| + virtual void ReadingListWillUpdateEntry(const ReadingListModel* model, |
| + const GURL& url) {} |
| // Called after all the changes signaled by calls to the "Will" methods are |
| // done. All the "Will" methods are called as necessary, then the changes |
| // are applied and then this method is called. |
| virtual void ReadingListDidApplyChanges(ReadingListModel* model) {} |
| + // TODO(crbug.com/664924): Remove temporary methods |
| + virtual void ReadingListWillRemoveUnreadEntry(const ReadingListModel* model, |
| + size_t index) {} |
| + |
| + virtual void ReadingListWillRemoveReadEntry(const ReadingListModel* model, |
| + size_t index) {} |
| + |
| + virtual void ReadingListWillAddUnreadEntry(const ReadingListModel* model, |
| + const ReadingListEntry& entry) {} |
| + |
| + virtual void ReadingListWillAddReadEntry(const ReadingListModel* model, |
| + const ReadingListEntry& entry) {} |
| + |
| protected: |
| ReadingListModelObserver() {} |
| virtual ~ReadingListModelObserver() {} |