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 CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_MODELS_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_MODELS_H_ |
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_MODELS_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_MODELS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 virtual int GetItemCount() const OVERRIDE; | 96 virtual int GetItemCount() const OVERRIDE; |
97 virtual string16 GetItemAt(int index) OVERRIDE; | 97 virtual string16 GetItemAt(int index) OVERRIDE; |
98 | 98 |
99 private: | 99 private: |
100 // The current year (e.g., 2012). | 100 // The current year (e.g., 2012). |
101 int this_year_; | 101 int this_year_; |
102 | 102 |
103 DISALLOW_COPY_AND_ASSIGN(YearComboboxModel); | 103 DISALLOW_COPY_AND_ASSIGN(YearComboboxModel); |
104 }; | 104 }; |
105 | 105 |
106 // A model for countries. | |
107 class CountryComboboxModel : public ui::ComboboxModel { | |
108 public: | |
109 CountryComboboxModel(); | |
110 virtual ~CountryComboboxModel(); | |
111 | |
112 // ui::Combobox implementation: | |
113 virtual int GetItemCount() const OVERRIDE; | |
114 virtual string16 GetItemAt(int index) OVERRIDE; | |
115 | |
116 private: | |
117 // The list of all countries. | |
118 std::vector<std::string> country_codes_; | |
119 | |
120 DISALLOW_COPY_AND_ASSIGN(CountryComboboxModel); | |
121 }; | |
122 | |
123 } // autofill | 106 } // autofill |
124 | 107 |
125 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_MODELS_H_ | 108 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_MODELS_H_ |
OLD | NEW |