diff options
author | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-09 16:56:00 +0000 |
---|---|---|
committer | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-09 16:56:00 +0000 |
commit | a11fa3437fdbb89ebe1e3a61cb4fc1de1ae4a352 (patch) | |
tree | cf59a7210e075e77c80d0e4e14b30277913e9715 /chrome/browser/extensions/extension_menu_manager.cc | |
parent | 5eb3572ff444cac4f5b78a6b7db26198476d11b6 (diff) | |
download | chromium_src-a11fa3437fdbb89ebe1e3a61cb4fc1de1ae4a352.zip chromium_src-a11fa3437fdbb89ebe1e3a61cb4fc1de1ae4a352.tar.gz chromium_src-a11fa3437fdbb89ebe1e3a61cb4fc1de1ae4a352.tar.bz2 |
Some cleanup of the extensions context menu API.
This CL contains the following:
-Use lower case names for enum values in the create/update properties (eg 'page' instead of 'PAGE')
-Make the top-level API name plural (contextMenus instead of contextMenu)
-Don't fire onclick handlers for a parent menu item when one of its children is clicked on.
-Remove the enabledContexts property for now, to eventually be replaced with a way to programmatically enable/disable.
There are a few more things in the bug that I'll be doing in subsequent CL's.
BUG=48198
TEST=Extensions using the context menu API should work with the changes described above.
Review URL: http://codereview.chromium.org/2887013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51970 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_menu_manager.cc')
-rw-r--r-- | chrome/browser/extensions/extension_menu_manager.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/chrome/browser/extensions/extension_menu_manager.cc b/chrome/browser/extensions/extension_menu_manager.cc index 42e3842..fc02637 100644 --- a/chrome/browser/extensions/extension_menu_manager.cc +++ b/chrome/browser/extensions/extension_menu_manager.cc @@ -27,15 +27,13 @@ ExtensionMenuItem::ExtensionMenuItem(const std::string& extension_id, std::string title, bool checked, Type type, - const ContextList& contexts, - const ContextList& enabled_contexts) + const ContextList& contexts) : extension_id_(extension_id), title_(title), id_(0), type_(type), checked_(checked), contexts_(contexts), - enabled_contexts_(enabled_contexts), parent_id_(0) {} ExtensionMenuItem::~ExtensionMenuItem() { @@ -439,7 +437,7 @@ void ExtensionMenuManager::ExecuteCommand(Profile* profile, std::string json_args; base::JSONWriter::Write(&args, false, &json_args); - std::string event_name = "contextMenu/" + item->extension_id(); + std::string event_name = "contextMenus/" + item->extension_id(); service->DispatchEventToRenderers(event_name, json_args, profile->IsOffTheRecord(), GURL()); } |