Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: chrome/browser/translate/options_menu_model.h

Issue 284313008: Move TranslateInfoBarDelegate and OptionsMenuModel to the Translate component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + review comments Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_TRANSLATE_OPTIONS_MENU_MODEL_H_
6 #define CHROME_BROWSER_TRANSLATE_OPTIONS_MENU_MODEL_H_
7
8 #include "ui/base/models/simple_menu_model.h"
9
10 class TranslateInfoBarDelegate;
11
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 {
16 public:
17 explicit OptionsMenuModel(TranslateInfoBarDelegate* translate_delegate);
18 virtual ~OptionsMenuModel();
19
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(
24 int command_id,
25 ui::Accelerator* accelerator) OVERRIDE;
26 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
27
28 private:
29 TranslateInfoBarDelegate* translate_infobar_delegate_;
30
31 DISALLOW_COPY_AND_ASSIGN(OptionsMenuModel);
32 };
33
34 #endif // CHROME_BROWSER_TRANSLATE_OPTIONS_MENU_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/translate/options_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698