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

Side by Side Diff: chrome/common/extensions/api/extension_api.json

Issue 7572015: Move types that are used as arguments to function definitions in IME extension API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code Review Created 9 years, 4 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 | no next file » | 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 2643 matching lines...) Expand 10 before | Expand all | Expand 10 after
2654 } 2654 }
2655 } 2655 }
2656 ], 2656 ],
2657 "events": [] 2657 "events": []
2658 }, 2658 },
2659 { 2659 {
2660 "namespace": "experimental.input", 2660 "namespace": "experimental.input",
2661 "nodoc": true, 2661 "nodoc": true,
2662 "types": [ 2662 "types": [
2663 { 2663 {
2664 "id": "MenuItem",
2665 "type": "object",
2666 "description": "A menu item used by an input method to interact with the user from the language menu.",
2667 "properties": {
2668 "id": {"type": "string", "description": "String that will be passed to callbacks referencing this MenuItem."},
2669 "label": {"type": "string", "optional": true, "description": "Text dis played in the menu for this item."},
2670 "style": {
2671 "type": "string",
2672 "optional": true,
2673 "description": "Enum representing if this item is: none, check, radi o, or a separator. Radio buttons between separators are considered grouped.",
2674 "enum": ["none", "check", "radio", "separator"]
2675 },
2676 "visible": {"type": "boolean", "optional": true, "description": "Indic ates this item is visible."},
2677 "checked": {"type": "boolean", "optional": true, "description": "Indic ates this item should be drawn with a check."},
2678 "enabled": {"type": "boolean", "optional": true, "description": "Indic ates this item is enabled."},
2679 "icon": {"type": "string", "optional": true, "description": "Name of t he icon to use. Must be bundled in the extension. Data urls are also acceptabl e."},
2680 "shortcutKey": {"type": "Keystroke", "optional": true, "description": "Used to create a shortcut key label. The IME should handle the shortcut key it self, however."},
2681 "children": {"type": "array", "items": { "type": "MenuItem" }, "option al": true, "description": "Menu items which will appear as children of this item ."}
2682 }
2683 },
2684 {
2685 "id": "KeyboardEvent", 2664 "id": "KeyboardEvent",
2686 "type": "object", 2665 "type": "object",
2687 "description": "See http://www.w3.org/TR/DOM-Level-3-Events/#events-Keyb oardEvent", 2666 "description": "See http://www.w3.org/TR/DOM-Level-3-Events/#events-Keyb oardEvent",
2688 "properties": { 2667 "properties": {
2689 "type": {"type": "string", "description": "One of keyup or keydown.", "enum": ["keyup", "keydown"]}, 2668 "type": {"type": "string", "description": "One of keyup or keydown.", "enum": ["keyup", "keydown"]},
2690 "key": {"type": "string", "description": "Value of the key being press ed"}, 2669 "key": {"type": "string", "description": "Value of the key being press ed"},
2691 "keyCode": {"type": "string", "description": "Value of the key being p ress, unmodified by control keys."}, 2670 "keyCode": {"type": "string", "description": "Value of the key being p ress, unmodified by control keys."},
2692 "altKey": {"type": "boolean", "optional": true, "description": "Whethe r or not the ALT key is pressed."}, 2671 "altKey": {"type": "boolean", "optional": true, "description": "Whethe r or not the ALT key is pressed."},
2693 "ctrlKey": {"type": "boolean", "optional": true, "description": "Wheth er or not the CTRL key is pressed."}, 2672 "ctrlKey": {"type": "boolean", "optional": true, "description": "Wheth er or not the CTRL key is pressed."},
2694 "shiftKey": {"type": "boolean", "optional": true, "description": "Whet her or not the SHIFT key is pressed."} 2673 "shiftKey": {"type": "boolean", "optional": true, "description": "Whet her or not the SHIFT key is pressed."}
2695 } 2674 }
2696 }, 2675 },
2697 { 2676 {
2698 "id": "Keystroke",
2699 "type": "object",
2700 "description": "See http://www.w3.org/TR/DOM-Level-3-Events/#events-Keyb oardEvent",
2701 "properties": {
2702 "key": {"type": "string", "description": "Value of the key being press ed"},
2703 "keyCode": {"type": "string", "description": "Value of the key being p ress, unmodified by control keys."},
2704 "altKey": {"type": "boolean", "optional": true, "description": "Whethe r or not the ALT key is pressed."},
2705 "ctrlKey": {"type": "boolean", "optional": true, "description": "Wheth er or not the CTRL key is pressed."},
2706 "shiftKey": {"type": "boolean", "optional": true, "description": "Whet her or not the SHIFT key is pressed."}
2707 }
2708 },
2709 {
2710 "id": "Candidate",
2711 "type": "object",
2712 "description": "An item in the candidate window",
2713 "properties": {
2714 "candidate": {"type": "string", "description": "The candidate"},
2715 "id": {"type": "integer", "description": "The candidate"},
2716 "label": {"type": "string", "optional": true, "description": "Short st ring displayed to next to the candidate, often the shortcut key or index"},
2717 "annotation": {"type": "string", "optional": true, "description": "Add itional text describing the candidate"},
2718 "subCandidates": {"type": "array", "items": { "type": "Candidate" }, " optional": true, "description": "Candidates that appear in a cascaded menu from this candidate."}
2719 }
2720 },
2721 {
2722 "id": "InputContext", 2677 "id": "InputContext",
2723 "type": "object", 2678 "type": "object",
2724 "description": "Describes an input Context", 2679 "description": "Describes an input Context",
2725 "properties": { 2680 "properties": {
2726 "textID": {"type": "integer", "description": "This is used to specify targets of text field operations. This ID becomes invalid as soon as onBlur is called."}, 2681 "contextID": {"type": "integer", "description": "This is used to speci fy targets of text field operations. This ID becomes invalid as soon as onBlur is called."},
2727 "type": {"type": "string", "description": "Type of value this text fie ld edits, (Text, Number, Password, etc)", "enum": ["text", "number", "password"] } 2682 "type": {"type": "string", "description": "Type of value this text fie ld edits, (Text, Number, Password, etc)", "enum": ["text", "number", "password"] }
2728 } 2683 }
2729 } 2684 }
2730 ], 2685 ],
2731 "functions": [ 2686 "functions": [
2732 { 2687 {
2733 "name": "sendKeyboardEvent", 2688 "name": "sendKeyboardEvent",
2734 "type": "function", 2689 "type": "function",
2735 "description": "Sends a keyboard event to Chrome.", 2690 "description": "Sends a keyboard event to Chrome.",
2736 "parameters": [ 2691 "parameters": [
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
2999 "name": "parameters", 2954 "name": "parameters",
3000 "type": "object", 2955 "type": "object",
3001 "properties": { 2956 "properties": {
3002 "contextID": { 2957 "contextID": {
3003 "description": "ID of the context that owns the candidate window .", 2958 "description": "ID of the context that owns the candidate window .",
3004 "type": "integer" 2959 "type": "integer"
3005 }, 2960 },
3006 "candidates": { 2961 "candidates": {
3007 "description": "List of candidates to show in the candidate wind ow", 2962 "description": "List of candidates to show in the candidate wind ow",
3008 "type": "array", 2963 "type": "array",
3009 "items": { "type": "Candidate" } 2964 "items": {
2965 "type": "object",
2966 "properties": {
2967 "candidate": {"type": "string", "description": "The candidat e"},
2968 "id": {"type": "integer", "description": "The candidate's id "},
2969 "parentId": {"type": "integer", "optional": true, "descripti on": "The id to add these candidates under"},
2970 "label": {"type": "string", "optional": true, "description": "Short string displayed to next to the candidate, often the shortcut key or ind ex"},
2971 "annotation": {"type": "string", "optional": true, "descript ion": "Additional text describing the candidate"}
2972 }
2973 }
3010 } 2974 }
3011 } 2975 }
3012 }, 2976 },
3013 { 2977 {
3014 "type": "function", 2978 "type": "function",
3015 "name": "callback", 2979 "name": "callback",
3016 "optional": true, 2980 "optional": true,
3017 "description": "Called when the operation completes.", 2981 "description": "Called when the operation completes.",
3018 "parameters": [ 2982 "parameters": [
3019 { 2983 {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
3058 "description": "Adds the provided menu items to the language menu when t his IME is active.", 3022 "description": "Adds the provided menu items to the language menu when t his IME is active.",
3059 "parameters": [ 3023 "parameters": [
3060 { 3024 {
3061 "name": "parameters", 3025 "name": "parameters",
3062 "type": "object", 3026 "type": "object",
3063 "properties": { 3027 "properties": {
3064 "engineID": { 3028 "engineID": {
3065 "description": "ID of the engine to use", 3029 "description": "ID of the engine to use",
3066 "type": "string" 3030 "type": "string"
3067 }, 3031 },
3032 "parentId": {
3033 "description": "ID of the parent menu item",
3034 "optional": true,
3035 "type": "string"
3036 },
3068 "items": { 3037 "items": {
3069 "description": "MenuItems to add. They will be added in the orde r they exist in the array.", 3038 "description": "MenuItems to add. They will be added in the orde r they exist in the array.",
3070 "type": "array", 3039 "type": "array",
3071 "items": { "type": "MenuItem" } 3040 "items": {
3041 "type": "object",
3042 "description": "A menu item used by an input method to interac t with the user from the language menu.",
3043 "properties": {
3044 "id": {"type": "string", "description": "String that will be passed to callbacks referencing this MenuItem."},
3045 "label": {"type": "string", "optional": true, "description": "Text displayed in the menu for this item."},
3046 "style": {
3047 "type": "string",
3048 "optional": true,
3049 "description": "Enum representing if this item is: none, c heck, radio, or a separator. Radio buttons between separators are considered gr ouped.",
3050 "enum": ["none", "check", "radio", "separator"]
3051 },
3052 "visible": {"type": "boolean", "optional": true, "descriptio n": "Indicates this item is visible."},
3053 "checked": {"type": "boolean", "optional": true, "descriptio n": "Indicates this item should be drawn with a check."},
3054 "enabled": {"type": "boolean", "optional": true, "descriptio n": "Indicates this item is enabled."},
3055 "icon": {"type": "string", "optional": true, "description": "Name of the icon to use. Must be bundled in the extension. Data urls are also acceptable."},
3056 "shortcutKey": {
3057 "type": "object",
3058 "optional": true,
3059 "description": "Used to create a shortcut key label. The IME should handle the shortcut key itself, however.",
3060 "properties": {
3061 "key": {"type": "string", "description": "Value of the k ey being pressed"},
3062 "keyCode": {"type": "string", "description": "Value of t he key being press, unmodified by control keys."},
3063 "altKey": {"type": "boolean", "optional": true, "descrip tion": "Whether or not the ALT key is pressed."},
3064 "ctrlKey": {"type": "boolean", "optional": true, "descri ption": "Whether or not the CTRL key is pressed."},
3065 "shiftKey": {"type": "boolean", "optional": true, "descr iption": "Whether or not the SHIFT key is pressed."}
3066 }
3067 }
3068 }
3069 }
3072 } 3070 }
3073 } 3071 }
3074 }, 3072 },
3075 { 3073 {
3076 "type": "function", 3074 "type": "function",
3077 "name": "callback", 3075 "name": "callback",
3078 "optional": true, 3076 "optional": true,
3079 "description": "", 3077 "description": "",
3080 "parameters": [] 3078 "parameters": []
3081 } 3079 }
3082 ] 3080 ]
3083 }, 3081 },
3084 { 3082 {
3085 "name": "updateMenuItems", 3083 "name": "updateMenuItems",
3086 "type": "function", 3084 "type": "function",
3087 "description": "Updates the state of the MenuItems specified", 3085 "description": "Updates the state of the MenuItems specified",
3088 "parameters": [ 3086 "parameters": [
3089 { 3087 {
3090 "name": "parameters", 3088 "name": "parameters",
3091 "type": "object", 3089 "type": "object",
3092 "properties": { 3090 "properties": {
3093 "engineID": { 3091 "engineID": {
3094 "description": "ID of the engine to use", 3092 "description": "ID of the engine to use",
3095 "type": "string" 3093 "type": "string"
3096 }, 3094 },
3097 "items": { 3095 "items": {
3098 "description": "Array of MenuItems to update", 3096 "description": "Array of MenuItems to update",
3099 "type": "array", 3097 "type": "array",
3100 "items": { "type": "MenuItem" } 3098 "items": {
3099 "type": "object",
3100 "description": "A menu item used by an input method to interac t with the user from the language menu.",
3101 "properties": {
3102 "id": {"type": "string", "description": "String that will be passed to callbacks referencing this MenuItem."},
3103 "label": {"type": "string", "optional": true, "description": "Text displayed in the menu for this item."},
3104 "style": {
3105 "type": "string",
3106 "optional": true,
3107 "description": "Enum representing if this item is: none, c heck, radio, or a separator. Radio buttons between separators are considered gr ouped.",
3108 "enum": ["none", "check", "radio", "separator"]
3109 },
3110 "visible": {"type": "boolean", "optional": true, "descriptio n": "Indicates this item is visible."},
3111 "checked": {"type": "boolean", "optional": true, "descriptio n": "Indicates this item should be drawn with a check."},
3112 "enabled": {"type": "boolean", "optional": true, "descriptio n": "Indicates this item is enabled."},
3113 "icon": {"type": "string", "optional": true, "description": "Name of the icon to use. Must be bundled in the extension. Data urls are also acceptable."},
3114 "shortcutKey": {
3115 "type": "object",
3116 "optional": true,
3117 "description": "Used to create a shortcut key label. The IME should handle the shortcut key itself, however.",
3118 "properties": {
3119 "key": {"type": "string", "description": "Value of the k ey being pressed"},
3120 "keyCode": {"type": "string", "description": "Value of t he key being press, unmodified by control keys."},
3121 "altKey": {"type": "boolean", "optional": true, "descrip tion": "Whether or not the ALT key is pressed."},
3122 "ctrlKey": {"type": "boolean", "optional": true, "descri ption": "Whether or not the CTRL key is pressed."},
3123 "shiftKey": {"type": "boolean", "optional": true, "descr iption": "Whether or not the SHIFT key is pressed."}
3124 }
3125 }
3126 }
3127 }
3101 } 3128 }
3102 } 3129 }
3103 }, 3130 },
3104 { 3131 {
3105 "type": "function", 3132 "type": "function",
3106 "name": "callback", 3133 "name": "callback",
3107 "optional": true, 3134 "optional": true,
3108 "description": "Called when the operation completes", 3135 "description": "Called when the operation completes",
3109 "parameters": [] 3136 "parameters": []
3110 } 3137 }
(...skipping 4237 matching lines...) Expand 10 before | Expand all | Expand 10 after
7348 "description": "A string result code. The value is non-empty on success only in tests.", 7375 "description": "A string result code. The value is non-empty on success only in tests.",
7349 "optional": "true" 7376 "optional": "true"
7350 } 7377 }
7351 ] 7378 ]
7352 } 7379 }
7353 ] 7380 ]
7354 } 7381 }
7355 ] 7382 ]
7356 } 7383 }
7357 ] 7384 ]
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698