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

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

Issue 359493005: Extend contextMenus API to support browser/page actions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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
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 "description": "Use the <code>chrome.contextMenus</code> API to add items to Google Chrome's context menu. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages.", 8 "description": "Use the <code>chrome.contextMenus</code> API to add items to Google Chrome's context menu. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages.",
9 "properties": {
10 "ACTION_MENU_TOP_LEVEL_LIMIT": {
11 "value": 6,
12 "description": "The maximum number of top level extension items that can be added to an extension action context menu. Any items beyond this limit will be ignored."
13 }
14 },
9 "functions": [ 15 "functions": [
10 { 16 {
11 "name": "create", 17 "name": "create",
12 "type": "function", 18 "type": "function",
13 "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.runtime.lastError).", 19 "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.runtime.lastError).",
14 "returns": { 20 "returns": {
15 "choices": [ 21 "choices": [
16 { "type": "integer" }, 22 { "type": "integer" },
17 { "type": "string" } 23 { "type": "string" }
18 ], 24 ],
(...skipping 22 matching lines...) Expand all
41 }, 47 },
42 "checked": { 48 "checked": {
43 "type": "boolean", 49 "type": "boolean",
44 "optional": true, 50 "optional": true,
45 "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." 51 "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."
46 }, 52 },
47 "contexts": { 53 "contexts": {
48 "type": "array", 54 "type": "array",
49 "items": { 55 "items": {
50 "type": "string", 56 "type": "string",
51 "enum": ["all", "page", "frame", "selection", "link", "editabl e", "image", "video", "audio", "launcher"] 57 "enum": ["all", "page", "frame", "selection", "link", "editabl e", "image", "video", "audio", "launcher", "browser_action", "page_action"]
52 }, 58 },
53 "minItems": 1, 59 "minItems": 1,
54 "optional": true, 60 "optional": true,
55 "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 only supported by apps and is used to add menu items to the context menu that appears when clicking on the app icon in the launcher/taskbar/dock/etc. Differen t platforms might put limitations on what is actually supported in a launcher co ntext menu." 61 "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 only supported by apps and is used to add menu items to the context menu that appears when clicking on the app icon in the launcher/taskbar/dock/etc. Differen t platforms might put limitations on what is actually supported in a launcher co ntext menu."
56 }, 62 },
57 "onclick": { 63 "onclick": {
58 "type": "function", 64 "type": "function",
59 "optional": true, 65 "optional": true,
60 "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.", 66 "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.",
61 "parameters": [ 67 "parameters": [
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 "optional": true 142 "optional": true
137 }, 143 },
138 "checked": { 144 "checked": {
139 "type": "boolean", 145 "type": "boolean",
140 "optional": true 146 "optional": true
141 }, 147 },
142 "contexts": { 148 "contexts": {
143 "type": "array", 149 "type": "array",
144 "items": { 150 "items": {
145 "type": "string", 151 "type": "string",
146 "enum": ["all", "page", "frame", "selection", "link", "editabl e", "image", "video", "audio", "launcher"] 152 "enum": ["all", "page", "frame", "selection", "link", "editabl e", "image", "video", "audio", "launcher", "browser_action", "page_action"]
147 }, 153 },
148 "minItems": 1, 154 "minItems": 1,
149 "optional": true 155 "optional": true
150 }, 156 },
151 "onclick": { 157 "onclick": {
152 "type": "function", 158 "type": "function",
153 "optional": true 159 "optional": true
154 }, 160 },
155 "parentId": { 161 "parentId": {
156 "choices": [ 162 "choices": [
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 ], 230 ],
225 "events": [ 231 "events": [
226 { 232 {
227 "name": "onClicked", 233 "name": "onClicked",
228 "type": "function", 234 "type": "function",
229 "$ref": "contextMenusInternal.onClicked" 235 "$ref": "contextMenusInternal.onClicked"
230 } 236 }
231 ] 237 ]
232 } 238 }
233 ] 239 ]
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_context_menu.cc ('k') | chrome/common/extensions/api/web_view_internal.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698