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 4685b6c9f42def7fe89997d542f87f85b64a12f7..620736516267981ec00b479b96e0e92d071cab19 100644 |
--- a/chrome/browser/extensions/extension_context_menu_model.h |
+++ b/chrome/browser/extensions/extension_context_menu_model.h |
@@ -17,6 +17,7 @@ class Profile; |
namespace extensions { |
class Extension; |
+class ContextMenuMatcher; |
} |
// The context menu model for extension icons. |
@@ -35,6 +36,13 @@ class ExtensionContextMenuModel |
INSPECT_POPUP |
}; |
+ // Type of action the extension icon represents. |
Devlin
2014/07/09 20:07:47
Do these actually need to be public?
gpdavis
2014/07/09 22:15:50
They are necessary for MenuItemMatchesExtension, w
Devlin
2014/07/09 22:42:58
Ah, that's right. Let's just leave it as-is for n
gpdavis
2014/07/10 00:22:25
Acknowledged.
|
+ enum ActionType { |
+ NO_ACTION = 0, |
+ BROWSER_ACTION, |
+ PAGE_ACTION |
+ }; |
+ |
// Delegate to handle showing an ExtensionAction popup. |
class PopupDelegate { |
public: |
@@ -81,6 +89,13 @@ class ExtensionContextMenuModel |
// extension has been uninstalled and no longer exists. |
const extensions::Extension* GetExtension() const; |
+ // Appends the extension's context menu items. |
+ void AppendExtensionItems(); |
+ |
+ // Determines whether this context menu was created for a browser action or |
+ // a page action. |
+ ActionType GetActionType(const extensions::Extension* extension); |
Devlin
2014/07/09 20:07:47
Does this still exist?
gpdavis
2014/07/09 22:15:50
No, no it does not. Sorry about all the dead code
|
+ |
// A copy of the extension's id. |
std::string extension_id_; |
@@ -95,9 +110,15 @@ 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_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ExtensionContextMenuModel); |
}; |