| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 [ | 5 [ |
| 6 { | 6 { |
| 7 "namespace": "chromeWebViewInternal", | 7 "namespace": "chromeWebViewInternal", |
| 8 "description": "none", | 8 "description": "none", |
| 9 "compiler_options": { | 9 "compiler_options": { |
| 10 "implemented_in": "chrome/browser/extensions/api/web_view/chrome_web_view_
internal_api.h" | 10 "implemented_in": "chrome/browser/extensions/api/web_view/chrome_web_view_
internal_api.h" |
| 11 }, | 11 }, |
| 12 "dependencies": ["contextMenusInternal"], | 12 "dependencies": ["contextMenusInternal", "contextMenus"], |
| 13 "types": [ | 13 "types": [ |
| 14 { | 14 { |
| 15 "id": "ContextMenuItem", | 15 "id": "ContextMenuItem", |
| 16 "type": "object", | 16 "type": "object", |
| 17 "description": "An item in the context menu.", | 17 "description": "An item in the context menu.", |
| 18 "properties": { | 18 "properties": { |
| 19 "label": { | 19 "label": { |
| 20 "type": "string", | 20 "type": "string", |
| 21 "description": "label of the item", | 21 "description": "label of the item", |
| 22 "optional": true | 22 "optional": true |
| (...skipping 20 matching lines...) Expand all Loading... |
| 43 { | 43 { |
| 44 "type": "integer", | 44 "type": "integer", |
| 45 "name": "instanceId", | 45 "name": "instanceId", |
| 46 "nodoc": true | 46 "nodoc": true |
| 47 }, | 47 }, |
| 48 { | 48 { |
| 49 "type": "object", | 49 "type": "object", |
| 50 "name": "createProperties", | 50 "name": "createProperties", |
| 51 "properties": { | 51 "properties": { |
| 52 "type": { | 52 "type": { |
| 53 "type": "string", | 53 "$ref": "contextMenus.ItemType", |
| 54 "enum": ["normal", "checkbox", "radio", "separator"], | |
| 55 "optional": true, | 54 "optional": true, |
| 56 "description": "The type of menu item. Defaults to 'normal' if n
ot specified." | 55 "description": "The type of menu item. Defaults to 'normal' if n
ot specified." |
| 57 }, | 56 }, |
| 58 "id": { | 57 "id": { |
| 59 "type": "string", | 58 "type": "string", |
| 60 "optional": true, | 59 "optional": true, |
| 61 "description": "The unique ID to assign to this item. Cannot be
the same as another ID for this webview." | 60 "description": "The unique ID to assign to this item. Cannot be
the same as another ID for this webview." |
| 62 }, | 61 }, |
| 63 "title": { | 62 "title": { |
| 64 "type": "string", | 63 "type": "string", |
| 65 "optional": true, | 64 "optional": true, |
| 66 "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\"." | 65 "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\"." |
| 67 }, | 66 }, |
| 68 "checked": { | 67 "checked": { |
| 69 "type": "boolean", | 68 "type": "boolean", |
| 70 "optional": true, | 69 "optional": true, |
| 71 "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." | 70 "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." |
| 72 }, | 71 }, |
| 73 "contexts": { | 72 "contexts": { |
| 74 "type": "array", | 73 "type": "array", |
| 75 "items": { | 74 "items": { |
| 76 "type": "string", | |
| 77 // |launcher| isn't actually supported, this is listed here so
that we can build |contexts| using the same code from chrome.contextMenus API. | 75 // |launcher| isn't actually supported, this is listed here so
that we can build |contexts| using the same code from chrome.contextMenus API. |
| 78 "enum": ["all", "page", "frame", "selection", "link", "editabl
e", "image", "video", "audio", "launcher", "browser_action", "page_action"] | 76 "$ref": "contextMenus.ContextType" |
| 79 }, | 77 }, |
| 80 "minItems": 1, | 78 "minItems": 1, |
| 81 "optional": true, | 79 "optional": true, |
| 82 "description": "List of contexts this menu item will appear in.
Defaults to ['page'] if not specified. Specifying ['all'] is equivalent to the c
ombination of all other contexts except for 'launcher'. The 'launcher' context i
s not supported for <webview>." | 80 "description": "List of contexts this menu item will appear in.
Defaults to ['page'] if not specified." |
| 83 }, | 81 }, |
| 84 "onclick": { | 82 "onclick": { |
| 85 "type": "function", | 83 "type": "function", |
| 86 "optional": true, | 84 "optional": true, |
| 87 "description": "A function that will be called back when the men
u item is clicked.", | 85 "description": "A function that will be called back when the men
u item is clicked.", |
| 88 "parameters": [ | 86 "parameters": [ |
| 89 { | 87 { |
| 90 "name": "info", | 88 "name": "info", |
| 91 "$ref": "contextMenusInternal.OnClickData", | 89 "$ref": "contextMenusInternal.OnClickData", |
| 92 "description": "Information about the item clicked and the c
ontext where the click happened." | 90 "description": "Information about the item clicked and the c
ontext where the click happened." |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 { "type": "string" } | 143 { "type": "string" } |
| 146 ], | 144 ], |
| 147 "name": "id", | 145 "name": "id", |
| 148 "description": "The ID of the item to update." | 146 "description": "The ID of the item to update." |
| 149 }, | 147 }, |
| 150 { "type": "object", | 148 { "type": "object", |
| 151 "name": "updateProperties", | 149 "name": "updateProperties", |
| 152 "description": "The properties to update. Accepts the same values as
the create function.", | 150 "description": "The properties to update. Accepts the same values as
the create function.", |
| 153 "properties": { | 151 "properties": { |
| 154 "type": { | 152 "type": { |
| 155 "type": "string", | 153 "$ref": "contextMenus.ItemType", |
| 156 "enum": ["normal", "checkbox", "radio", "separator"], | |
| 157 "optional": true | 154 "optional": true |
| 158 }, | 155 }, |
| 159 "title": { | 156 "title": { |
| 160 "type": "string", | 157 "type": "string", |
| 161 "optional": true | 158 "optional": true |
| 162 }, | 159 }, |
| 163 "checked": { | 160 "checked": { |
| 164 "type": "boolean", | 161 "type": "boolean", |
| 165 "optional": true | 162 "optional": true |
| 166 }, | 163 }, |
| 167 "contexts": { | 164 "contexts": { |
| 168 "type": "array", | 165 "type": "array", |
| 169 "items": { | 166 "items": { |
| 170 "type": "string", | |
| 171 // |launcher| isn't actually supported, this is listed here so
that we can build |contexts| using the same code from chrome.contextMenus API. | 167 // |launcher| isn't actually supported, this is listed here so
that we can build |contexts| using the same code from chrome.contextMenus API. |
| 172 "enum": ["all", "page", "frame", "selection", "link", "editabl
e", "image", "video", "audio", "launcher", "browser_action", "page_action"] | 168 "$ref": "contextMenus.ContextType" |
| 173 }, | 169 }, |
| 174 "minItems": 1, | 170 "minItems": 1, |
| 175 "optional": true, | 171 "optional": true, |
| 176 "description": "List of contexts this menu item will appear in.
Defaults to ['page'] if not specified. Specifying ['all'] is equivalent to the c
ombination of all other contexts except for 'launcher'. The 'launcher' context i
s not supported for <webview>." | 172 "description": "List of contexts this menu item will appear in.
Defaults to ['page'] if not specified." |
| 177 }, | 173 }, |
| 178 "onclick": { | 174 "onclick": { |
| 179 "type": "function", | 175 "type": "function", |
| 180 "optional": true | 176 "optional": true |
| 181 }, | 177 }, |
| 182 "parentId": { | 178 "parentId": { |
| 183 "choices": [ | 179 "choices": [ |
| 184 { "type": "integer" }, | 180 { "type": "integer" }, |
| 185 { "type": "string" } | 181 { "type": "string" } |
| 186 ], | 182 ], |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 "parameters": [ | 300 "parameters": [ |
| 305 ] | 301 ] |
| 306 } | 302 } |
| 307 } | 303 } |
| 308 } | 304 } |
| 309 ] | 305 ] |
| 310 } | 306 } |
| 311 ] | 307 ] |
| 312 } | 308 } |
| 313 ] | 309 ] |
| OLD | NEW |