Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PRESELECTED_COMBOBOX_MODEL_H_ | |
| 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PRESELECTED_COMBOBOX_MODEL_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "ui/base/models/simple_combobox_model.h" | |
|
please use gerrit instead
2017/02/16 14:52:19
#include <vector>
#include "base/strings/string16.
Mathieu
2017/02/16 16:00:08
Done.
| |
| 10 | |
| 11 namespace payments { | |
| 12 | |
| 13 // A simple data model for a combobox that takes a string16 vector as the items, | |
| 14 // as well as the default selected index. An empty string is a separator. | |
| 15 class PreselectedComboboxModel : public ui::SimpleComboboxModel { | |
| 16 public: | |
| 17 PreselectedComboboxModel(const std::vector<base::string16>& items, | |
| 18 int default_index); | |
| 19 ~PreselectedComboboxModel() override; | |
| 20 | |
| 21 // ui::ComboboxModel: | |
| 22 int GetDefaultIndex() const override; | |
| 23 | |
| 24 private: | |
| 25 const int default_index_; | |
| 26 | |
| 27 DISALLOW_COPY_AND_ASSIGN(PreselectedComboboxModel); | |
| 28 }; | |
| 29 | |
| 30 } // namespace payments | |
| 31 | |
| 32 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PRESELECTED_COMBOBOX_MODEL_H_ | |
| OLD | NEW |