OLD | NEW |
(Empty) | |
| 1 // 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 |
| 5 #ifndef CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_DENIAL_MENU_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_DENIAL_MENU_MODEL_H_ |
| 7 |
| 8 #include "ui/base/models/simple_menu_model.h" |
| 9 |
| 10 class TranslateDenialMenuModelObserver; |
| 11 |
| 12 // A model for the menu to deny translation in various ways. |
| 13 class TranslateDenialMenuModel : public ui::SimpleMenuModel, |
| 14 public ui::SimpleMenuModel::Delegate { |
| 15 public: |
| 16 TranslateDenialMenuModel(const string16& original_language_name, |
| 17 TranslateDenialMenuModelObserver* observer); |
| 18 |
| 19 // ui::SimpleMenuModel::Delegate: |
| 20 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; |
| 21 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; |
| 22 virtual bool GetAcceleratorForCommandId( |
| 23 int command_id, |
| 24 ui::Accelerator* accelerator) OVERRIDE; |
| 25 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; |
| 26 |
| 27 private: |
| 28 TranslateDenialMenuModelObserver* observer_; |
| 29 |
| 30 DISALLOW_COPY_AND_ASSIGN(TranslateDenialMenuModel); |
| 31 }; |
| 32 |
| 33 #endif // CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_DENIAL_MENU_MODEL_H_ |
OLD | NEW |