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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/common/extensions/docs/contextMenus.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 [ 1 [
2 { 2 {
3 "namespace": "extension", 3 "namespace": "extension",
4 "unprivileged": true, 4 "unprivileged": true,
5 "types": [ 5 "types": [
6 { 6 {
7 "id": "MessageSender", 7 "id": "MessageSender",
8 "type": "object", 8 "type": "object",
9 "description": "An object containing information about the script contex t that sent a message or request.", 9 "description": "An object containing information about the script contex t that sent a message or request.",
10 "properties": { 10 "properties": {
(...skipping 2798 matching lines...) Expand 10 before | Expand all | Expand 10 after
2809 "type": "integer", 2809 "type": "integer",
2810 "description": "The ID of the newly created item." 2810 "description": "The ID of the newly created item."
2811 }, 2811 },
2812 "parameters": [ 2812 "parameters": [
2813 { 2813 {
2814 "type": "object", 2814 "type": "object",
2815 "name": "createProperties", 2815 "name": "createProperties",
2816 "properties": { 2816 "properties": {
2817 "type": { 2817 "type": {
2818 "type": "string", 2818 "type": "string",
2819 "enum": ["normal", "checkbox", "radio", "separator"],
2819 "optional": true, 2820 "optional": true,
2820 "description": "The type of menu item - one of 'normal', 'checkb ox', 'radio', or 'separator'. Defaults to 'normal' if not specified." 2821 "description": "The type of menu item. Defaults to 'normal' if n ot specified."
2821 }, 2822 },
2822 "title": { 2823 "title": {
2823 "type": "string", 2824 "type": "string",
2824 "optional": "true", 2825 "optional": true,
2825 "description": "The text to be displayed in the item; this is <e m>required</em> unless <em>type</em> is 'separator'. When the context is 'select ion', you can use <code>%s</code> within the string to show the selected text. F or 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 \"Tr anslate 'cool' to Pig Latin\"." 2826 "description": "The text to be displayed in the item; this is <e m>required</em> unless <em>type</em> is 'separator'. When the context is 'select ion', you can use <code>%s</code> within the string to show the selected text. F or 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 \"Tr anslate 'cool' to Pig Latin\"."
2826 }, 2827 },
2827 "checked": { 2828 "checked": {
2828 "type": "boolean", 2829 "type": "boolean",
2829 "optional": true, 2830 "optional": true,
2830 "description": "The initial state of a checkbox or radio item: t rue for selected and false for unselected. Only one radio item can be selected a t a time in a given group of radio items." 2831 "description": "The initial state of a checkbox or radio item: t rue for selected and false for unselected. Only one radio item can be selected a t a time in a given group of radio items."
2831 }, 2832 },
2832 "contexts": { 2833 "contexts": {
2833 "type": "array", 2834 "type": "array",
2834 "items": {"type": "string"}, 2835 "items": {
2836 "type": "string",
2837 "enum": ["all", "page", "frame", "selection", "link", "editabl e", "image", "video", "audio"]
2838 },
2835 "minItems": 1, 2839 "minItems": 1,
2836 "optional": true, 2840 "optional": true,
2837 "description": "List of contexts this menu item will appear in. Legal values are: 'all', 'page', 'frame', 'selection', 'link', 'editable', 'imag e', 'video', and 'audio'. Defaults to ['page']." 2841 "description": "List of contexts this menu item will appear in. Defaults to ['page'] if not specified."
2838 }, 2842 },
2839 "onclick": { 2843 "onclick": {
2840 "type": "function", 2844 "type": "function",
2841 "optional": true, 2845 "optional": true,
2842 "description": "A function that will be called back when the men u item is clicked.", 2846 "description": "A function that will be called back when the men u item is clicked.",
2843 "parameters": [ 2847 "parameters": [
2844 { 2848 {
2845 "name": "info", 2849 "name": "info",
2846 "$ref": "OnClickData", 2850 "$ref": "OnClickData",
2847 "description": "Information about the item clicked and the c ontext where the click happened." 2851 "description": "Information about the item clicked and the c ontext where the click happened."
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
2895 "type": "object", 2899 "type": "object",
2896 "name": "updateProperties", 2900 "name": "updateProperties",
2897 "description": "The properties to update. Accepts the same values as the create function.", 2901 "description": "The properties to update. Accepts the same values as the create function.",
2898 "properties": { 2902 "properties": {
2899 "type": { 2903 "type": {
2900 "type": "string", 2904 "type": "string",
2901 "optional": true 2905 "optional": true
2902 }, 2906 },
2903 "title": { 2907 "title": {
2904 "type": "string", 2908 "type": "string",
2905 "optional": "true" 2909 "enum": ["normal", "checkbox", "radio", "separator"],
2910 "optional": true
2906 }, 2911 },
2907 "checked": { 2912 "checked": {
2908 "type": "boolean", 2913 "type": "boolean",
2909 "optional": true 2914 "optional": true
2910 }, 2915 },
2911 "contexts": { 2916 "contexts": {
2912 "type": "array", 2917 "type": "array",
2913 "items": {"type": "string"}, 2918 "items": {
2919 "type": "string",
2920 "enum": ["all", "page", "frame", "selection", "link", "editabl e", "image", "video", "audio"]
2921 },
2914 "minItems": 1, 2922 "minItems": 1,
2915 "optional": true 2923 "optional": true
2916 }, 2924 },
2917 "onclick": { 2925 "onclick": {
2918 "type": "function", 2926 "type": "function",
2919 "optional": true 2927 "optional": true
2920 }, 2928 },
2921 "parentId": { 2929 "parentId": {
2922 "type": "integer", 2930 "type": "integer",
2923 "optional": true, 2931 "optional": true,
(...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after
4962 { 4970 {
4963 "type": "integer", 4971 "type": "integer",
4964 "name": "tabId", 4972 "name": "tabId",
4965 "description": "The id of the tab that was detached." 4973 "description": "The id of the tab that was detached."
4966 } 4974 }
4967 ] 4975 ]
4968 } 4976 }
4969 ] 4977 ]
4970 } 4978 }
4971 ] 4979 ]
OLDNEW
« 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