summaryrefslogtreecommitdiffstats
path: root/views/examples/example_combobox_model.cc
blob: ec55093068ca87c5483c4a6615083ab64bb16550 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "views/examples/example_combobox_model.h"

#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
#include "ui/base/models/combobox_model.h"

namespace examples {

ExampleComboboxModel::ExampleComboboxModel(const char** strings, int count)
    : strings_(strings), count_(count) {
}

ExampleComboboxModel::~ExampleComboboxModel() {
}

int ExampleComboboxModel::GetItemCount() {
  return count_;
}

string16 ExampleComboboxModel::GetItemAt(int index) {
  return ASCIIToUTF16(strings_[index]);
}

}  // namespace examples