Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1634)

Unified Diff: chrome/common/extensions/api/context_menus.json

Issue 10454106: Dispatch a new event chrome.contextMenus.onClicked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: names Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/context_menus.json
diff --git a/chrome/common/extensions/api/context_menus.json b/chrome/common/extensions/api/context_menus.json
index c0aae39393573e1cc935b62648a7adba1d7fa133..72ee54200f31a5fbffafcd0046c82d78047441ea 100644
--- a/chrome/common/extensions/api/context_menus.json
+++ b/chrome/common/extensions/api/context_menus.json
@@ -57,8 +57,18 @@
"description": "The text for the context selection, if any."
},
"editable": {
- "type": "string",
Aaron Boodman 2012/06/01 19:08:11 lawls
+ "type": "boolean",
"description": "A flag indicating whether the element is editable (text input, textarea, etc.)."
+ },
+ "wasChecked": {
+ "type": "boolean",
+ "optional": true,
+ "description": "A flag indicating the state of a checkbox or radio item before it was clicked."
+ },
+ "checked": {
+ "type": "boolean",
+ "optional": true,
+ "description": "A flag indicating the state of a checkbox or radio item after it is clicked."
}
}
}
@@ -114,7 +124,7 @@
"onclick": {
"type": "function",
"optional": true,
- "description": "A function that will be called back when the menu item is clicked.",
+ "description": "A function that will be called back when the menu item is clicked. Event pages cannot use this; instead, they should register a listener for chrome.contextMenus.onClicked.",
"parameters": [
{
"name": "info",
@@ -277,6 +287,25 @@
}
]
}
+ ],
+ "events": [
+ {
+ "name": "onClicked",
+ "type": "function",
+ "description": "Fired when a context menu item is clicked.",
+ "parameters": [
+ {
+ "name": "info",
+ "$ref": "OnClickData",
+ "description": "Information about the item clicked and the context where the click happened."
+ },
+ {
+ "name": "tab",
+ "$ref": "tabs.Tab",
+ "description": "The details of the tab where the click took place."
+ }
+ ]
+ }
]
}
]
« no previous file with comments | « chrome/browser/extensions/extension_menu_manager_unittest.cc ('k') | chrome/common/extensions/docs/contextMenus.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698