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

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: Minor changes and cleanup Created 6 years, 5 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 "functions": [ 9 "functions": [
10 { 10 {
(...skipping 30 matching lines...) Expand all
41 }, 41 },
42 "checked": { 42 "checked": {
43 "type": "boolean", 43 "type": "boolean",
44 "optional": true, 44 "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." 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."
46 }, 46 },
47 "contexts": { 47 "contexts": {
48 "type": "array", 48 "type": "array",
49 "items": { 49 "items": {
50 "type": "string", 50 "type": "string",
51 "enum": ["all", "page", "frame", "selection", "link", "editabl e", "image", "video", "audio", "launcher"] 51 "enum": ["all", "page", "frame", "selection", "link", "editabl e", "image", "video", "audio", "launcher", "browser_action", "page_action"]
52 }, 52 },
53 "minItems": 1, 53 "minItems": 1,
54 "optional": true, 54 "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." 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."
56 }, 56 },
57 "onclick": { 57 "onclick": {
58 "type": "function", 58 "type": "function",
59 "optional": true, 59 "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.", 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.",
61 "parameters": [ 61 "parameters": [
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 "optional": true 136 "optional": true
137 }, 137 },
138 "checked": { 138 "checked": {
139 "type": "boolean", 139 "type": "boolean",
140 "optional": true 140 "optional": true
141 }, 141 },
142 "contexts": { 142 "contexts": {
143 "type": "array", 143 "type": "array",
144 "items": { 144 "items": {
145 "type": "string", 145 "type": "string",
146 "enum": ["all", "page", "frame", "selection", "link", "editabl e", "image", "video", "audio", "launcher"] 146 "enum": ["all", "page", "frame", "selection", "link", "editabl e", "image", "video", "audio", "launcher", "browser_action", "page_action"]
147 }, 147 },
148 "minItems": 1, 148 "minItems": 1,
149 "optional": true 149 "optional": true
150 }, 150 },
151 "onclick": { 151 "onclick": {
152 "type": "function", 152 "type": "function",
153 "optional": true 153 "optional": true
154 }, 154 },
155 "parentId": { 155 "parentId": {
156 "choices": [ 156 "choices": [
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 ], 224 ],
225 "events": [ 225 "events": [
226 { 226 {
227 "name": "onClicked", 227 "name": "onClicked",
228 "type": "function", 228 "type": "function",
229 "$ref": "contextMenusInternal.onClicked" 229 "$ref": "contextMenusInternal.onClicked"
230 } 230 }
231 ] 231 ]
232 } 232 }
233 ] 233 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698