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