| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_COMBOBOX_MODEL_H_ | 5 #ifndef UI_BASE_MODELS_COMBOBOX_MODEL_H_ |
| 6 #define UI_BASE_MODELS_COMBOBOX_MODEL_H_ | 6 #define UI_BASE_MODELS_COMBOBOX_MODEL_H_ |
| 7 | 7 |
| 8 #include "base/string16.h" | 8 #include "base/string16.h" |
| 9 #include "ui/base/ui_export.h" |
| 9 | 10 |
| 10 namespace ui { | 11 namespace ui { |
| 11 | 12 |
| 12 // A data model for a combo box. | 13 // A data model for a combo box. |
| 13 class ComboboxModel { | 14 class UI_EXPORT ComboboxModel { |
| 14 public: | 15 public: |
| 15 // Returns the number of items in the combo box. | 16 // Returns the number of items in the combo box. |
| 16 virtual int GetItemCount() const = 0; | 17 virtual int GetItemCount() const = 0; |
| 17 | 18 |
| 18 // Returns the string at the specified index. | 19 // Returns the string at the specified index. |
| 19 virtual string16 GetItemAt(int index) = 0; | 20 virtual string16 GetItemAt(int index) = 0; |
| 20 | 21 |
| 22 // The index of the item that is selected by default (before user |
| 23 // interaction). |
| 24 virtual int GetDefaultIndex() const; |
| 25 |
| 21 protected: | 26 protected: |
| 22 virtual ~ComboboxModel() {} | 27 virtual ~ComboboxModel() {} |
| 23 }; | 28 }; |
| 24 | 29 |
| 25 } // namespace ui | 30 } // namespace ui |
| 26 | 31 |
| 27 #endif // UI_BASE_MODELS_COMBOBOX_MODEL_H_ | 32 #endif // UI_BASE_MODELS_COMBOBOX_MODEL_H_ |
| OLD | NEW |