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 SimpleComboboxModel(const std::vector<base::string16> & items)9SimpleComboboxModel::SimpleComboboxModel( 10 const std::vector<base::string16>& items) 11 : items_(items) { 12 } 13 ~SimpleComboboxModel()14SimpleComboboxModel::~SimpleComboboxModel() { 15 } 16 GetItemCount() const17int SimpleComboboxModel::GetItemCount() const { 18 return items_.size(); 19 } 20 GetItemAt(int index)21base::string16 SimpleComboboxModel::GetItemAt(int index) { 22 return items_[index]; 23 } 24 IsItemSeparatorAt(int index)25bool SimpleComboboxModel::IsItemSeparatorAt(int index) { 26 return items_[index].empty(); 27 } 28 GetDefaultIndex() const29int SimpleComboboxModel::GetDefaultIndex() const { 30 return 0; 31 } 32 33 } // namespace ui 34