This source file includes following definitions.
- model_
- GetItemCount
- GetItemAt
- GetDefaultIndex
#include "chrome/browser/ui/translate/language_combobox_model.h"
#include "chrome/browser/ui/translate/translate_bubble_model.h"
LanguageComboboxModel::LanguageComboboxModel(
int default_index,
TranslateBubbleModel* model)
: default_index_(default_index < 0 ? 0 : default_index),
model_(model) {
}
LanguageComboboxModel::~LanguageComboboxModel() {
}
int LanguageComboboxModel::GetItemCount() const {
return model_->GetNumberOfLanguages();
}
base::string16 LanguageComboboxModel::GetItemAt(int index) {
return model_->GetLanguageNameAt(index);
}
int LanguageComboboxModel::GetDefaultIndex() const {
return default_index_;
}