| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 COMPONENTS_TRANSLATE_CORE_BROWSER_OPTIONS_MENU_MODEL_H_ | 5 #ifndef COMPONENTS_TRANSLATE_CORE_BROWSER_OPTIONS_MENU_MODEL_H_ |
| 6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_OPTIONS_MENU_MODEL_H_ | 6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_OPTIONS_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 namespace translate { |
| 11 |
| 10 class TranslateInfoBarDelegate; | 12 class TranslateInfoBarDelegate; |
| 11 | 13 |
| 12 // A menu model that builds the contents of the options menu in the translate | 14 // A menu model that builds the contents of the options menu in the translate |
| 13 // infobar. This menu has only one level (no submenus). | 15 // infobar. This menu has only one level (no submenus). |
| 14 class OptionsMenuModel : public ui::SimpleMenuModel, | 16 class OptionsMenuModel : public ui::SimpleMenuModel, |
| 15 public ui::SimpleMenuModel::Delegate { | 17 public ui::SimpleMenuModel::Delegate { |
| 16 public: | 18 public: |
| 17 // Command IDs of the items in this menu; exposed for testing. | 19 // Command IDs of the items in this menu; exposed for testing. |
| 18 enum CommandID { | 20 enum CommandID { |
| 19 ABOUT_TRANSLATE = 0, | 21 ABOUT_TRANSLATE = 0, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 33 int command_id, | 35 int command_id, |
| 34 ui::Accelerator* accelerator) OVERRIDE; | 36 ui::Accelerator* accelerator) OVERRIDE; |
| 35 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; | 37 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; |
| 36 | 38 |
| 37 private: | 39 private: |
| 38 TranslateInfoBarDelegate* translate_infobar_delegate_; | 40 TranslateInfoBarDelegate* translate_infobar_delegate_; |
| 39 | 41 |
| 40 DISALLOW_COPY_AND_ASSIGN(OptionsMenuModel); | 42 DISALLOW_COPY_AND_ASSIGN(OptionsMenuModel); |
| 41 }; | 43 }; |
| 42 | 44 |
| 45 } // namespace translate |
| 46 |
| 43 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_OPTIONS_MENU_MODEL_H_ | 47 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_OPTIONS_MENU_MODEL_H_ |
| OLD | NEW |