OLD | NEW |
---|---|
(Empty) | |
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 #ifndef CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_DENIAL_COMBOBOX_MODEL_H_ | |
6 #define CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_DENIAL_COMBOBOX_MODEL_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "base/basictypes.h" | |
11 #include "ui/base/models/combobox_model.h" | |
12 | |
13 class TranslateDenialComboboxModel : public ui::ComboboxModel { | |
sky
2014/06/17 16:30:38
How about a SimpleComboboxModel in ui/base/models
hajimehoshi
2014/06/18 08:33:37
Done.
| |
14 public: | |
15 enum { | |
sky
2014/06/17 16:30:38
Generally we use C++ style for enums.
hajimehoshi
2014/06/18 08:33:37
Done.
| |
16 INDEX_NOPE = 0, | |
17 INDEX_NEVER_TRANSLATE_LANGUAGE = 2, | |
18 INDEX_NEVER_TRANSLATE_SITE = 4, | |
19 }; | |
20 | |
21 explicit TranslateDenialComboboxModel( | |
22 const base::string16& original_language_name); | |
23 virtual ~TranslateDenialComboboxModel(); | |
24 | |
25 private: | |
26 // Overridden from ui::ComboboxModel: | |
27 virtual int GetItemCount() const OVERRIDE; | |
28 virtual base::string16 GetItemAt(int index); | |
29 virtual bool IsItemSeparatorAt(int index); | |
30 virtual int GetDefaultIndex() const; | |
31 | |
32 std::vector<base::string16> items_; | |
33 | |
34 DISALLOW_COPY_AND_ASSIGN(TranslateDenialComboboxModel); | |
35 }; | |
36 | |
37 #endif // CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_DENIAL_COMBOBOX_MODEL_H_ | |
OLD | NEW |