Chromium Code Reviews| 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 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/scoped_vector.h" | |
| 13 #include "base/string16.h" | 14 #include "base/string16.h" |
| 15 #include "chrome/browser/autofill/autofill_country.h" | |
|
Ilya Sherman
2013/02/26 00:31:13
nit: Can you forward-declare this?
| |
| 14 #include "ui/base/models/combobox_model.h" | 16 #include "ui/base/models/combobox_model.h" |
| 15 #include "ui/base/models/simple_menu_model.h" | 17 #include "ui/base/models/simple_menu_model.h" |
| 16 | 18 |
| 17 namespace autofill { | 19 namespace autofill { |
| 18 | 20 |
| 19 class SuggestionsMenuModel; | 21 class SuggestionsMenuModel; |
| 20 | 22 |
| 21 class SuggestionsMenuModelDelegate { | 23 class SuggestionsMenuModelDelegate { |
| 22 public: | 24 public: |
| 23 virtual ~SuggestionsMenuModelDelegate(); | 25 virtual ~SuggestionsMenuModelDelegate(); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 | 107 |
| 106 // A model for countries. | 108 // A model for countries. |
| 107 class CountryComboboxModel : public ui::ComboboxModel { | 109 class CountryComboboxModel : public ui::ComboboxModel { |
| 108 public: | 110 public: |
| 109 CountryComboboxModel(); | 111 CountryComboboxModel(); |
| 110 virtual ~CountryComboboxModel(); | 112 virtual ~CountryComboboxModel(); |
| 111 | 113 |
| 112 // ui::Combobox implementation: | 114 // ui::Combobox implementation: |
| 113 virtual int GetItemCount() const OVERRIDE; | 115 virtual int GetItemCount() const OVERRIDE; |
| 114 virtual string16 GetItemAt(int index) OVERRIDE; | 116 virtual string16 GetItemAt(int index) OVERRIDE; |
| 117 virtual int GetDefaultIndex() const OVERRIDE; | |
| 115 | 118 |
| 116 private: | 119 private: |
| 117 // The list of all countries. | 120 // The list of all countries. |
| 118 std::vector<std::string> country_codes_; | 121 ScopedVector<AutofillCountry> countries_; |
| 119 | 122 |
| 120 DISALLOW_COPY_AND_ASSIGN(CountryComboboxModel); | 123 DISALLOW_COPY_AND_ASSIGN(CountryComboboxModel); |
| 121 }; | 124 }; |
| 122 | 125 |
| 123 } // autofill | 126 } // autofill |
| 124 | 127 |
| 125 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_MODELS_H_ | 128 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_MODELS_H_ |
| OLD | NEW |