blob: 380a17596768b43129eb6d2b084915ae3a06467a [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>
9
[email protected]0cf64142013-10-19 13:52:3910#include "base/compiler_specific.h"
avi655876a2015-12-25 07:18:1511#include "base/macros.h"
[email protected]0cf64142013-10-19 13:52:3912#include "base/strings/string16.h"
13#include "ui/base/models/combobox_model.h"
14
15class TranslateBubbleModel;
16
17// The model for the combobox to select a language. This is used for Translate
18// user interface to select language.
Haohao Wanga35a46f2019-05-07 23:47:0219class TargetLanguageComboboxModel : public ui::ComboboxModel {
[email protected]0cf64142013-10-19 13:52:3920 public:
Haohao Wanga35a46f2019-05-07 23:47:0221 TargetLanguageComboboxModel(int default_index, TranslateBubbleModel* model);
22 ~TargetLanguageComboboxModel() override;
[email protected]0cf64142013-10-19 13:52:3923
24 // Overridden from ui::ComboboxModel:
dcheng5dd5ff62014-10-21 12:42:3825 int GetItemCount() const override;
Mohamed Amir Yosef6a4b5702020-05-21 15:32:4626 base::string16 GetItemAt(int index) const override;
dcheng5dd5ff62014-10-21 12:42:3827 int GetDefaultIndex() const override;
[email protected]0cf64142013-10-19 13:52:3928
29 private:
30 const int default_index_;
31 TranslateBubbleModel* model_;
32
Haohao Wanga35a46f2019-05-07 23:47:0233 DISALLOW_COPY_AND_ASSIGN(TargetLanguageComboboxModel);
[email protected]0cf64142013-10-19 13:52:3934};
35
Haohao Wanga35a46f2019-05-07 23:47:0236#endif // CHROME_BROWSER_UI_TRANSLATE_TARGET_LANGUAGE_COMBOBOX_MODEL_H_