OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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": "contextMenus", | 7 "namespace": "contextMenus", |
8 "dependencies": [ "tabs" ], | 8 "dependencies": [ "tabs" ], |
9 "types": [ | 9 "types": [ |
10 { | 10 { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 "type": "string", | 50 "type": "string", |
51 "optional": true, | 51 "optional": true, |
52 "description": " The URL of the frame of the element where the conte xt menu was clicked, if it was in a frame." | 52 "description": " The URL of the frame of the element where the conte xt menu was clicked, if it was in a frame." |
53 }, | 53 }, |
54 "selectionText": { | 54 "selectionText": { |
55 "type": "string", | 55 "type": "string", |
56 "optional": true, | 56 "optional": true, |
57 "description": "The text for the context selection, if any." | 57 "description": "The text for the context selection, if any." |
58 }, | 58 }, |
59 "editable": { | 59 "editable": { |
60 "type": "string", | 60 "type": "boolean", |
Aaron Boodman
2012/06/01 19:08:11
lawls
| |
61 "description": "A flag indicating whether the element is editable (t ext input, textarea, etc.)." | 61 "description": "A flag indicating whether the element is editable (t ext input, textarea, etc.)." |
62 }, | |
63 "wasChecked": { | |
64 "type": "boolean", | |
65 "optional": true, | |
66 "description": "A flag indicating the state of a checkbox or radio i tem before it was clicked." | |
67 }, | |
68 "checked": { | |
69 "type": "boolean", | |
70 "optional": true, | |
71 "description": "A flag indicating the state of a checkbox or radio i tem after it is clicked." | |
62 } | 72 } |
63 } | 73 } |
64 } | 74 } |
65 ], | 75 ], |
66 "functions": [ | 76 "functions": [ |
67 { | 77 { |
68 "name": "create", | 78 "name": "create", |
69 "type": "function", | 79 "type": "function", |
70 "description": "Creates a new context menu item. Note that if an error o ccurs during creation, you may not find out until the creation callback fires (t he details will be in chrome.extension.lastError).", | 80 "description": "Creates a new context menu item. Note that if an error o ccurs during creation, you may not find out until the creation callback fires (t he details will be in chrome.extension.lastError).", |
71 "returns": { | 81 "returns": { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
107 "type": "string", | 117 "type": "string", |
108 "enum": ["all", "page", "frame", "selection", "link", "editabl e", "image", "video", "audio"] | 118 "enum": ["all", "page", "frame", "selection", "link", "editabl e", "image", "video", "audio"] |
109 }, | 119 }, |
110 "minItems": 1, | 120 "minItems": 1, |
111 "optional": true, | 121 "optional": true, |
112 "description": "List of contexts this menu item will appear in. Defaults to ['page'] if not specified." | 122 "description": "List of contexts this menu item will appear in. Defaults to ['page'] if not specified." |
113 }, | 123 }, |
114 "onclick": { | 124 "onclick": { |
115 "type": "function", | 125 "type": "function", |
116 "optional": true, | 126 "optional": true, |
117 "description": "A function that will be called back when the men u item is clicked.", | 127 "description": "A function that will be called back when the men u item is clicked. Event pages cannot use this; instead, they should register a listener for chrome.contextMenus.onClicked.", |
118 "parameters": [ | 128 "parameters": [ |
119 { | 129 { |
120 "name": "info", | 130 "name": "info", |
121 "$ref": "OnClickData", | 131 "$ref": "OnClickData", |
122 "description": "Information about the item clicked and the c ontext where the click happened." | 132 "description": "Information about the item clicked and the c ontext where the click happened." |
123 }, | 133 }, |
124 { | 134 { |
125 "name": "tab", | 135 "name": "tab", |
126 "$ref": "tabs.Tab", | 136 "$ref": "tabs.Tab", |
127 "description": "The details of the tab where the click took place." | 137 "description": "The details of the tab where the click took place." |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
270 "parameters": [ | 280 "parameters": [ |
271 { | 281 { |
272 "type": "function", | 282 "type": "function", |
273 "name": "callback", | 283 "name": "callback", |
274 "optional": true, | 284 "optional": true, |
275 "parameters": [], | 285 "parameters": [], |
276 "description": "Called when removal is complete." | 286 "description": "Called when removal is complete." |
277 } | 287 } |
278 ] | 288 ] |
279 } | 289 } |
290 ], | |
291 "events": [ | |
292 { | |
293 "name": "onClicked", | |
294 "type": "function", | |
295 "description": "Fired when a context menu item is clicked.", | |
296 "parameters": [ | |
297 { | |
298 "name": "info", | |
299 "$ref": "OnClickData", | |
300 "description": "Information about the item clicked and the context w here the click happened." | |
301 }, | |
302 { | |
303 "name": "tab", | |
304 "$ref": "tabs.Tab", | |
305 "description": "The details of the tab where the click took place." | |
306 } | |
307 ] | |
308 } | |
280 ] | 309 ] |
281 } | 310 } |
282 ] | 311 ] |
OLD | NEW |