OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "chrome/browser/extensions/extension_uninstall_dialog.h" | 11 #include "chrome/browser/extensions/extension_uninstall_dialog.h" |
12 #include "ui/base/models/simple_menu_model.h" | 12 #include "ui/base/models/simple_menu_model.h" |
13 | 13 |
14 class Browser; | 14 class Browser; |
15 class ExtensionAction; | 15 class ExtensionAction; |
16 class Profile; | 16 class Profile; |
17 | 17 |
18 namespace extensions { | 18 namespace extensions { |
19 class Extension; | 19 class Extension; |
20 } | 20 } |
21 | 21 |
22 // The context menu model for extension icons. | 22 // The context menu model for extension icons. |
23 class ExtensionContextMenuModel | 23 class ExtensionContextMenuModel |
24 : public base::RefCounted<ExtensionContextMenuModel>, | 24 : public base::RefCounted<ExtensionContextMenuModel>, |
25 public ui::SimpleMenuModel, | 25 public ui::SimpleMenuModel, |
26 public ui::SimpleMenuModel::Delegate, | 26 public ui::SimpleMenuModel::Delegate, |
27 public ExtensionUninstallDialog::Delegate { | 27 public extensions::ExtensionUninstallDialog::Delegate { |
28 public: | 28 public: |
29 enum MenuEntries { | 29 enum MenuEntries { |
30 NAME = 0, | 30 NAME = 0, |
31 CONFIGURE, | 31 CONFIGURE, |
32 HIDE, | 32 HIDE, |
33 UNINSTALL, | 33 UNINSTALL, |
34 MANAGE, | 34 MANAGE, |
35 INSPECT_POPUP | 35 INSPECT_POPUP |
36 }; | 36 }; |
37 | 37 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 ExtensionAction* extension_action_; | 89 ExtensionAction* extension_action_; |
90 | 90 |
91 Browser* browser_; | 91 Browser* browser_; |
92 | 92 |
93 Profile* profile_; | 93 Profile* profile_; |
94 | 94 |
95 // The delegate which handles the 'inspect popup' menu command (or NULL). | 95 // The delegate which handles the 'inspect popup' menu command (or NULL). |
96 PopupDelegate* delegate_; | 96 PopupDelegate* delegate_; |
97 | 97 |
98 // Keeps track of the extension uninstall dialog. | 98 // Keeps track of the extension uninstall dialog. |
99 scoped_ptr<ExtensionUninstallDialog> extension_uninstall_dialog_; | 99 scoped_ptr<extensions::ExtensionUninstallDialog> extension_uninstall_dialog_; |
100 | 100 |
101 DISALLOW_COPY_AND_ASSIGN(ExtensionContextMenuModel); | 101 DISALLOW_COPY_AND_ASSIGN(ExtensionContextMenuModel); |
102 }; | 102 }; |
103 | 103 |
104 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ | 104 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ |
OLD | NEW |