| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 APP_TABLE_MODEL_OBSERVER_H_ | 5 #ifndef APP_TABLE_MODEL_OBSERVER_H_ |
| 6 #define APP_TABLE_MODEL_OBSERVER_H_ | 6 #define APP_TABLE_MODEL_OBSERVER_H_ |
| 7 | 7 |
| 8 // Observer for a TableModel. Anytime the model changes, it must notify its | 8 // Observer for a TableModel. Anytime the model changes, it must notify its |
| 9 // observer. | 9 // observer. |
| 10 class TableModelObserver { | 10 class TableModelObserver { |
| 11 public: | 11 public: |
| 12 // Invoked when the model has been completely changed. | 12 // Invoked when the model has been completely changed. |
| 13 virtual void OnModelChanged() = 0; | 13 virtual void OnModelChanged() = 0; |
| 14 | 14 |
| 15 // Invoked when a range of items has changed. | 15 // Invoked when a range of items has changed. |
| 16 virtual void OnItemsChanged(int start, int length) = 0; | 16 virtual void OnItemsChanged(int start, int length) = 0; |
| 17 | 17 |
| 18 // Invoked when new items are added. | 18 // Invoked when new items are added. |
| 19 virtual void OnItemsAdded(int start, int length) = 0; | 19 virtual void OnItemsAdded(int start, int length) = 0; |
| 20 | 20 |
| 21 // Invoked when a range of items has been removed. | 21 // Invoked when a range of items has been removed. |
| 22 virtual void OnItemsRemoved(int start, int length) = 0; | 22 virtual void OnItemsRemoved(int start, int length) = 0; |
| 23 | |
| 24 protected: | |
| 25 ~TableModelObserver() {} | |
| 26 }; | 23 }; |
| 27 | 24 |
| 28 #endif // APP_TABLE_MODEL_OBSERVER_H_ | 25 #endif // APP_TABLE_MODEL_OBSERVER_H_ |
| OLD | NEW |