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

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

Issue 10454106: Dispatch a new event chrome.contextMenus.onClicked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
OLDNEW
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
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",
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 } 62 }
63 } 63 }
64 } 64 }
65 ], 65 ],
66 "functions": [ 66 "functions": [
67 { 67 {
68 "name": "create", 68 "name": "create",
69 "type": "function", 69 "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).", 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).",
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 "type": "string", 107 "type": "string",
108 "enum": ["all", "page", "frame", "selection", "link", "editabl e", "image", "video", "audio"] 108 "enum": ["all", "page", "frame", "selection", "link", "editabl e", "image", "video", "audio"]
109 }, 109 },
110 "minItems": 1, 110 "minItems": 1,
111 "optional": true, 111 "optional": true,
112 "description": "List of contexts this menu item will appear in. Defaults to ['page'] if not specified." 112 "description": "List of contexts this menu item will appear in. Defaults to ['page'] if not specified."
113 }, 113 },
114 "onclick": { 114 "onclick": {
115 "type": "function", 115 "type": "function",
116 "optional": true, 116 "optional": true,
117 "description": "A function that will be called back when the men u item is clicked.", 117 "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": [ 118 "parameters": [
119 { 119 {
120 "name": "info", 120 "name": "info",
121 "$ref": "OnClickData", 121 "$ref": "OnClickData",
122 "description": "Information about the item clicked and the c ontext where the click happened." 122 "description": "Information about the item clicked and the c ontext where the click happened."
123 }, 123 },
124 { 124 {
125 "name": "tab", 125 "name": "tab",
126 "$ref": "tabs.Tab", 126 "$ref": "tabs.Tab",
127 "description": "The details of the tab where the click took place." 127 "description": "The details of the tab where the click took place."
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 "parameters": [ 270 "parameters": [
271 { 271 {
272 "type": "function", 272 "type": "function",
273 "name": "callback", 273 "name": "callback",
274 "optional": true, 274 "optional": true,
275 "parameters": [], 275 "parameters": [],
276 "description": "Called when removal is complete." 276 "description": "Called when removal is complete."
277 } 277 }
278 ] 278 ]
279 } 279 }
280 ],
281 "events": [
282 {
283 "name": "onClicked",
284 "type": "function",
285 "description": "Fired when a context menu item is clicked.",
286 "parameters": [
287 {
288 "name": "info",
289 "$ref": "OnClickData",
290 "description": "Information about the item clicked and the context w here the click happened."
291 },
292 {
293 "name": "tab",
294 "$ref": "tabs.Tab",
295 "description": "The details of the tab where the click took place."
296 }
297 ]
298 }
280 ] 299 ]
281 } 300 }
282 ] 301 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698