| Index: chrome/browser/extensions/extension_context_menu_model.h
|
| diff --git a/chrome/browser/extensions/extension_context_menu_model.h b/chrome/browser/extensions/extension_context_menu_model.h
|
| index a07d9d534fac896f25eae444bf455c9276b2a9b1..0ec50f7b330c841cb9a86ffe93694e2b6fb6b68d 100644
|
| --- a/chrome/browser/extensions/extension_context_menu_model.h
|
| +++ b/chrome/browser/extensions/extension_context_menu_model.h
|
| @@ -17,6 +17,8 @@ class Profile;
|
|
|
| namespace extensions {
|
| class Extension;
|
| +class ContextMenuMatcher;
|
| +class ExtensionContextMenuModelTest;
|
| }
|
|
|
| // The context menu model for extension icons.
|
| @@ -35,6 +37,9 @@ class ExtensionContextMenuModel
|
| INSPECT_POPUP
|
| };
|
|
|
| + // Type of action the extension icon represents.
|
| + enum ActionType { NO_ACTION = 0, BROWSER_ACTION, PAGE_ACTION };
|
| +
|
| // Delegate to handle showing an ExtensionAction popup.
|
| class PopupDelegate {
|
| public:
|
| @@ -74,6 +79,8 @@ class ExtensionContextMenuModel
|
|
|
| private:
|
| friend class base::RefCounted<ExtensionContextMenuModel>;
|
| + friend class extensions::ExtensionContextMenuModelTest;
|
| +
|
| virtual ~ExtensionContextMenuModel();
|
|
|
| void InitMenu(const extensions::Extension* extension);
|
| @@ -82,6 +89,9 @@ class ExtensionContextMenuModel
|
| // extension has been uninstalled and no longer exists.
|
| const extensions::Extension* GetExtension() const;
|
|
|
| + // Appends the extension's context menu items.
|
| + void AppendExtensionItems();
|
| +
|
| // A copy of the extension's id.
|
| std::string extension_id_;
|
|
|
| @@ -96,9 +106,18 @@ class ExtensionContextMenuModel
|
| // The delegate which handles the 'inspect popup' menu command (or NULL).
|
| PopupDelegate* delegate_;
|
|
|
| + // The type of extension action to which this context menu is attached.
|
| + ActionType action_type_;
|
| +
|
| // Keeps track of the extension uninstall dialog.
|
| scoped_ptr<extensions::ExtensionUninstallDialog> extension_uninstall_dialog_;
|
|
|
| + // Menu matcher for context menu items specified by the extension.
|
| + scoped_ptr<extensions::ContextMenuMatcher> extension_items_;
|
| +
|
| + // Number of extension items in this menu. Used for testing.
|
| + int extension_items_count_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ExtensionContextMenuModel);
|
| };
|
|
|
|
|