| 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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 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 extensions::ExtensionUninstallDialog::Delegate { | 27 public extensions::ExtensionUninstallDialog::Delegate { |
| 28 public: | 28 public: |
| 29 enum MenuEntries { | 29 enum MenuEntries { |
| 30 NAME = 0, | 30 NAME = 0, |
| 31 ALWAYS_ALLOW, |
| 31 CONFIGURE, | 32 CONFIGURE, |
| 32 HIDE, | 33 HIDE, |
| 33 UNINSTALL, | 34 UNINSTALL, |
| 34 MANAGE, | 35 MANAGE, |
| 35 INSPECT_POPUP | 36 INSPECT_POPUP |
| 36 }; | 37 }; |
| 37 | 38 |
| 38 // Delegate to handle showing an ExtensionAction popup. | 39 // Delegate to handle showing an ExtensionAction popup. |
| 39 class PopupDelegate { | 40 class PopupDelegate { |
| 40 public: | 41 public: |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // The delegate which handles the 'inspect popup' menu command (or NULL). | 96 // The delegate which handles the 'inspect popup' menu command (or NULL). |
| 96 PopupDelegate* delegate_; | 97 PopupDelegate* delegate_; |
| 97 | 98 |
| 98 // Keeps track of the extension uninstall dialog. | 99 // Keeps track of the extension uninstall dialog. |
| 99 scoped_ptr<extensions::ExtensionUninstallDialog> extension_uninstall_dialog_; | 100 scoped_ptr<extensions::ExtensionUninstallDialog> extension_uninstall_dialog_; |
| 100 | 101 |
| 101 DISALLOW_COPY_AND_ASSIGN(ExtensionContextMenuModel); | 102 DISALLOW_COPY_AND_ASSIGN(ExtensionContextMenuModel); |
| 102 }; | 103 }; |
| 103 | 104 |
| 104 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ | 105 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ |
| OLD | NEW |