| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 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 #include "ui/base/models/simple_combobox_model.h" | |
| 6 | |
| 7 namespace ui { | |
| 8 | |
| 9 SimpleComboboxModel::SimpleComboboxModel( | |
| 10 const std::vector<base::string16>& items) | |
| 11 : items_(items) { | |
| 12 } | |
| 13 | |
| 14 SimpleComboboxModel::~SimpleComboboxModel() { | |
| 15 } | |
| 16 | |
| 17 int SimpleComboboxModel::GetItemCount() const { | |
| 18 return items_.size(); | |
| 19 } | |
| 20 | |
| 21 base::string16 SimpleComboboxModel::GetItemAt(int index) { | |
| 22 return items_[index]; | |
| 23 } | |
| 24 | |
| 25 bool SimpleComboboxModel::IsItemSeparatorAt(int index) { | |
| 26 return items_[index].empty(); | |
| 27 } | |
| 28 | |
| 29 int SimpleComboboxModel::GetDefaultIndex() const { | |
| 30 return 0; | |
| 31 } | |
| 32 | |
| 33 } // namespace ui | |
| OLD | NEW |