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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_TRANSLATE_OPTIONS_MENU_MODEL_H_
6 #define CHROME_BROWSER_TRANSLATE_OPTIONS_MENU_MODEL_H_
8 #include "ui/base/models/simple_menu_model.h"
10 class TranslateInfoBarDelegate;
12 // A menu model that builds the contents of the options menu in the translate
13 // infobar. This menu has only one level (no submenus).
14 class OptionsMenuModel : public ui::SimpleMenuModel,
15 public ui::SimpleMenuModel::Delegate {
17 explicit OptionsMenuModel(TranslateInfoBarDelegate* translate_delegate);
18 virtual ~OptionsMenuModel();
20 // ui::SimpleMenuModel::Delegate implementation:
21 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
22 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
23 virtual bool GetAcceleratorForCommandId(
25 ui::Accelerator* accelerator) OVERRIDE;
26 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
29 TranslateInfoBarDelegate* translate_infobar_delegate_;
31 DISALLOW_COPY_AND_ASSIGN(OptionsMenuModel);
34 #endif // CHROME_BROWSER_TRANSLATE_OPTIONS_MENU_MODEL_H_