blob: 9e3b0c57cfde9f16f3911fa3a2df99490ebd1058 [file] [log] [blame]
[email protected]0cf64142013-10-19 13:52:391// Copyright 2013 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
Haohao Wanga35a46f2019-05-07 23:47:025#ifndef CHROME_BROWSER_UI_TRANSLATE_TARGET_LANGUAGE_COMBOBOX_MODEL_H_
6#define CHROME_BROWSER_UI_TRANSLATE_TARGET_LANGUAGE_COMBOBOX_MODEL_H_
[email protected]0cf64142013-10-19 13:52:397
dcheng9603ab92016-04-08 04:17:328#include <memory>
Jan Wilken Dörriead587c32021-03-11 14:09:279#include <string>
dcheng9603ab92016-04-08 04:17:3210
[email protected]0cf64142013-10-19 13:52:3911#include "base/compiler_specific.h"
avi655876a2015-12-25 07:18:1512#include "base/macros.h"
[email protected]0cf64142013-10-19 13:52:3913#include "base/strings/string16.h"
14#include "ui/base/models/combobox_model.h"
15
16class TranslateBubbleModel;
17
18// The model for the combobox to select a language. This is used for Translate
19// user interface to select language.
Haohao Wanga35a46f2019-05-07 23:47:0220class TargetLanguageComboboxModel : public ui::ComboboxModel {
[email protected]0cf64142013-10-19 13:52:3921 public:
Haohao Wanga35a46f2019-05-07 23:47:0222 TargetLanguageComboboxModel(int default_index, TranslateBubbleModel* model);
23 ~TargetLanguageComboboxModel() override;
[email protected]0cf64142013-10-19 13:52:3924
25 // Overridden from ui::ComboboxModel:
dcheng5dd5ff62014-10-21 12:42:3826 int GetItemCount() const override;
Mohamed Amir Yosef6a4b5702020-05-21 15:32:4627 base::string16 GetItemAt(int index) const override;
dcheng5dd5ff62014-10-21 12:42:3828 int GetDefaultIndex() const override;
[email protected]0cf64142013-10-19 13:52:3929
30 private:
31 const int default_index_;
32 TranslateBubbleModel* model_;
33
Haohao Wanga35a46f2019-05-07 23:47:0234 DISALLOW_COPY_AND_ASSIGN(TargetLanguageComboboxModel);
[email protected]0cf64142013-10-19 13:52:3935};
36
Haohao Wanga35a46f2019-05-07 23:47:0237#endif // CHROME_BROWSER_UI_TRANSLATE_TARGET_LANGUAGE_COMBOBOX_MODEL_H_