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

Side by Side Diff: chrome/browser/extensions/extension_action_context_menu_model.h

Issue 501136: Merge 34812 - Add the rightclick context menu for Browser actions and Page... (Closed) Base URL: svn://chrome-svn/chrome/branches/249/src/
Patch Set: Created 11 years 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) 2009 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_EXTENSIONS_EXTENSION_ACTION_CONTEXT_MENU_MODEL_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_CONTEXT_MENU_MODEL_H_
7
8 #include "views/controls/menu/simple_menu_model.h"
9 #include "chrome/browser/extensions/extension_install_ui.h"
10
11 class Extension;
12
13 // The menu model for the context menu for extension action icons (browser and
14 // page actions).
15 class ExtensionActionContextMenuModel
16 : public views::SimpleMenuModel,
17 public views::SimpleMenuModel::Delegate {
18 public:
19 ExtensionActionContextMenuModel(Extension* extension,
20 ExtensionInstallUI::Delegate* delegate);
21 ~ExtensionActionContextMenuModel();
22
23 // SimpleMenuModel behavior overrides.
24 virtual bool IsCommandIdChecked(int command_id) const;
25 virtual bool IsCommandIdEnabled(int command_id) const;
26 virtual bool GetAcceleratorForCommandId(int command_id,
27 views::Accelerator* accelerator);
28 virtual void ExecuteCommand(int command_id);
29
30 private:
31 // The extension we are displaying the context menu for.
32 Extension* extension_;
33
34 // The delegate that handles the extension Uninstall operation.
35 ExtensionInstallUI::Delegate* delegate_;
36
37 DISALLOW_COPY_AND_ASSIGN(ExtensionActionContextMenuModel);
38 };
39
40 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_CONTEXT_MENU_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/extension_action_context_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698