OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_LANGUAGE_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_LANGUAGE_MENU_MODEL_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_LANGUAGE_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_LANGUAGE_MENU_MODEL_H_ |
7 | 7 |
8 #include "ui/base/models/simple_menu_model.h" | 8 #include "ui/base/models/simple_menu_model.h" |
9 | 9 |
10 class TranslateInfoBarBase; | 10 class TranslateInfoBarBase; |
11 class TranslateInfoBarDelegate; | 11 class TranslateInfoBarDelegate; |
| 12 |
12 namespace views { | 13 namespace views { |
13 class MenuButton; | 14 class MenuButton; |
14 } | 15 } |
15 | 16 |
16 // A menu model that builds the contents of the language menus in the translate | 17 // A menu model that builds the contents of the language menus in the translate |
17 // infobar. This menu has only one level (no submenus). | 18 // infobar. This menu has only one level (no submenus). |
18 class TranslateLanguageMenuModel : public ui::SimpleMenuModel, | 19 class TranslateLanguageMenuModel : public ui::SimpleMenuModel, |
19 public ui::SimpleMenuModel::Delegate { | 20 public ui::SimpleMenuModel::Delegate { |
20 public: | 21 public: |
21 enum LanguageType { | 22 enum LanguageType { |
(...skipping 22 matching lines...) Expand all Loading... |
44 LanguageType language_type_; | 45 LanguageType language_type_; |
45 TranslateInfoBarDelegate* infobar_delegate_; | 46 TranslateInfoBarDelegate* infobar_delegate_; |
46 TranslateInfoBarBase* infobar_; | 47 TranslateInfoBarBase* infobar_; |
47 views::MenuButton* button_; | 48 views::MenuButton* button_; |
48 const bool translate_on_change_; | 49 const bool translate_on_change_; |
49 | 50 |
50 DISALLOW_COPY_AND_ASSIGN(TranslateLanguageMenuModel); | 51 DISALLOW_COPY_AND_ASSIGN(TranslateLanguageMenuModel); |
51 }; | 52 }; |
52 | 53 |
53 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_LANGUAGE_MENU_MODEL_H_ | 54 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_TRANSLATE_LANGUAGE_MENU_MODEL_H_ |
OLD | NEW |