| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_READING_LIST_IOS_READING_LIST_MODEL_OBSERVER_H_ | 5 #ifndef COMPONENTS_READING_LIST_IOS_READING_LIST_MODEL_OBSERVER_H_ |
| 6 #define COMPONENTS_READING_LIST_IOS_READING_LIST_MODEL_OBSERVER_H_ | 6 #define COMPONENTS_READING_LIST_IOS_READING_LIST_MODEL_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 // Invoked when an entry is about to change. | 58 // Invoked when an entry is about to change. |
| 59 virtual void ReadingListWillUpdateEntry(const ReadingListModel* model, | 59 virtual void ReadingListWillUpdateEntry(const ReadingListModel* model, |
| 60 const GURL& url) {} | 60 const GURL& url) {} |
| 61 | 61 |
| 62 // Called after all the changes signaled by calls to the "Will" methods are | 62 // Called after all the changes signaled by calls to the "Will" methods are |
| 63 // done. All the "Will" methods are called as necessary, then the changes | 63 // done. All the "Will" methods are called as necessary, then the changes |
| 64 // are applied and then this method is called. | 64 // are applied and then this method is called. |
| 65 virtual void ReadingListDidApplyChanges(ReadingListModel* model) {} | 65 virtual void ReadingListDidApplyChanges(ReadingListModel* model) {} |
| 66 | 66 |
| 67 // TODO(crbug.com/664924): Remove temporary methods | |
| 68 virtual void ReadingListWillRemoveUnreadEntry(const ReadingListModel* model, | |
| 69 size_t index) {} | |
| 70 | |
| 71 virtual void ReadingListWillRemoveReadEntry(const ReadingListModel* model, | |
| 72 size_t index) {} | |
| 73 | |
| 74 virtual void ReadingListWillAddUnreadEntry(const ReadingListModel* model, | |
| 75 const ReadingListEntry& entry) {} | |
| 76 | |
| 77 virtual void ReadingListWillAddReadEntry(const ReadingListModel* model, | |
| 78 const ReadingListEntry& entry) {} | |
| 79 | |
| 80 protected: | 67 protected: |
| 81 ReadingListModelObserver() {} | 68 ReadingListModelObserver() {} |
| 82 virtual ~ReadingListModelObserver() {} | 69 virtual ~ReadingListModelObserver() {} |
| 83 | 70 |
| 84 DISALLOW_COPY_AND_ASSIGN(ReadingListModelObserver); | 71 DISALLOW_COPY_AND_ASSIGN(ReadingListModelObserver); |
| 85 }; | 72 }; |
| 86 | 73 |
| 87 #endif // COMPONENTS_READING_LIST_IOS_READING_LIST_MODEL_OBSERVER_H_ | 74 #endif // COMPONENTS_READING_LIST_IOS_READING_LIST_MODEL_OBSERVER_H_ |
| OLD | NEW |