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 int SimpleComboboxModel::GetItemCount() const { |
| 15 return items_.size(); |
| 16 } |
| 17 |
| 18 base::string16 SimpleComboboxModel::GetItemAt(int index) { |
| 19 return items_[index]; |
| 20 } |
| 21 |
| 22 bool SimpleComboboxModel::IsItemSeparatorAt(int index) { |
| 23 return items_[index].empty(); |
| 24 } |
| 25 |
| 26 int SimpleComboboxModel::GetDefaultIndex() const { |
| 27 return 0; |
| 28 } |
| 29 |
| 30 } // namespace ui |
OLD | NEW |