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

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

Issue 6801032: Change some context menu APIs to use enums in the schema. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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
« no previous file with comments | « no previous file | chrome/common/extensions/docs/contextMenus.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/extension_api.json
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json
index f62312561eb822835f2672473815821f8141ff93..3388a4b955c69fc948d4b1cbaf158e320c2462a2 100644
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -2816,12 +2816,13 @@
"properties": {
"type": {
"type": "string",
+ "enum": ["normal", "checkbox", "radio", "separator"],
"optional": true,
- "description": "The type of menu item - one of 'normal', 'checkbox', 'radio', or 'separator'. Defaults to 'normal' if not specified."
+ "description": "The type of menu item. Defaults to 'normal' if not specified."
},
"title": {
"type": "string",
- "optional": "true",
+ "optional": true,
"description": "The text to be displayed in the item; this is <em>required</em> unless <em>type</em> is 'separator'. When the context is 'selection', you can use <code>%s</code> within the string to show the selected text. For example, if this parameter's value is \"Translate '%s' to Pig Latin\" and the user selects the word \"cool\", the context menu item for the selection is \"Translate 'cool' to Pig Latin\"."
},
"checked": {
@@ -2831,10 +2832,13 @@
},
"contexts": {
"type": "array",
- "items": {"type": "string"},
+ "items": {
+ "type": "string",
+ "enum": ["all", "page", "frame", "selection", "link", "editable", "image", "video", "audio"]
+ },
"minItems": 1,
"optional": true,
- "description": "List of contexts this menu item will appear in. Legal values are: 'all', 'page', 'frame', 'selection', 'link', 'editable', 'image', 'video', and 'audio'. Defaults to ['page']."
+ "description": "List of contexts this menu item will appear in. Defaults to ['page'] if not specified."
},
"onclick": {
"type": "function",
@@ -2902,7 +2906,8 @@
},
"title": {
"type": "string",
- "optional": "true"
+ "enum": ["normal", "checkbox", "radio", "separator"],
+ "optional": true
},
"checked": {
"type": "boolean",
@@ -2910,7 +2915,10 @@
},
"contexts": {
"type": "array",
- "items": {"type": "string"},
+ "items": {
+ "type": "string",
+ "enum": ["all", "page", "frame", "selection", "link", "editable", "image", "video", "audio"]
+ },
"minItems": 1,
"optional": true
},
« no previous file with comments | « no previous file | chrome/common/extensions/docs/contextMenus.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698