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

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: 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..2fe7f076d4c14cb1526febeb0c6e8a70c2d04290 100644
--- a/chrome/common/extensions/api/context_menus.json
+++ b/chrome/common/extensions/api/context_menus.json
@@ -57,7 +57,7 @@
"description": "The text for the context selection, if any."
},
"editable": {
- "type": "string",
+ "type": "boolean",
"description": "A flag indicating whether the element is editable (text input, textarea, etc.)."
}
}
@@ -114,7 +114,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 +277,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."
+ }
+ ]
+ }
]
}
]

Powered by Google App Engine
This is Rietveld 408576698