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

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

Issue 1580983002: Fix the dynamic browser action setIcon path to work with any size icon. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update more json Created 4 years, 11 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": "pageAction", 7 "namespace": "pageAction",
8 "description": "Use the <code>chrome.pageAction</code> API to put icons insi de the address bar. Page actions represent actions that can be taken on the curr ent page, but that aren't applicable to all pages.", 8 "description": "Use the <code>chrome.pageAction</code> API to put icons insi de the address bar. Page actions represent actions that can be taken on the curr ent page, but that aren't applicable to all pages.",
9 "types": [ 9 "types": [
10 { 10 {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 { 82 {
83 "name": "details", 83 "name": "details",
84 "type": "object", 84 "type": "object",
85 "properties": { 85 "properties": {
86 "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."}, 86 "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
87 "imageData": { 87 "imageData": {
88 "choices": [ 88 "choices": [
89 { "$ref": "ImageDataType" }, 89 { "$ref": "ImageDataType" },
90 { 90 {
91 "type": "object", 91 "type": "object",
92 "properties": { 92 "additionalProperties": { "type": "any" }
93 "19": {"$ref": "ImageDataType", "optional": true},
94 "38": {"$ref": "ImageDataType", "optional": true}
95 }
96 } 93 }
97 ], 94 ],
98 "optional": true, 95 "optional": true,
99 "description": "Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictio nary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code> scale</code>, then image with size <code>scale</code> * 19 will be selected. Ini tially only scales 1 and 2 will be supported. At least one image must be specifi ed. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {' 19': foo}'" 96 "description": "Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictio nary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code> scale</code>, then image with size <code>scale</code> * n will be selected, wher e n is the size of the icon in the UI. At least one image must be specified. Not e that 'details.imageData = foo' is equivalent to 'details.imageData = {'16': fo o}'"
100 }, 97 },
101 "path": { 98 "path": {
102 "choices": [ 99 "choices": [
103 { "type": "string" }, 100 { "type": "string" },
104 { 101 {
105 "type": "object", 102 "type": "object",
106 "properties": { 103 "additionalProperties": { "type": "any" }
107 "19": {"type": "string", "optional": true},
108 "38": {"type": "string", "optional": true}
109 }
110 } 104 }
111 ], 105 ],
112 "optional": true, 106 "optional": true,
113 "description": "Either a relative image path or a dictionary {si ze -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pix el density. If the number of image pixels that fit into one screen space unit eq uals <code>scale</code>, then image with size <code>scale</code> * 19 will be se lected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageDat a = {'19': foo}'" 107 "description": "Either a relative image path or a dictionary {si ze -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pix el density. If the number of image pixels that fit into one screen space unit eq uals <code>scale</code>, then image with size <code>scale</code> * n will be sel ected, where n is the size of the icon in the UI. At least one image must be spe cified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'1 6': foo}'"
varkha 2016/01/21 03:05:49 s/details.imageData/details.path ?
114 }, 108 },
115 "iconIndex": { 109 "iconIndex": {
116 "type": "integer", 110 "type": "integer",
117 "minimum": 0, 111 "minimum": 0,
118 "description": "<b>Deprecated.</b> This argument is ignored.", 112 "description": "<b>Deprecated.</b> This argument is ignored.",
119 "optional": true 113 "optional": true
120 } 114 }
121 } 115 }
122 }, 116 },
123 { 117 {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 "parameters": [ 176 "parameters": [
183 { 177 {
184 "name": "tab", 178 "name": "tab",
185 "$ref": "tabs.Tab" 179 "$ref": "tabs.Tab"
186 } 180 }
187 ] 181 ]
188 } 182 }
189 ] 183 ]
190 } 184 }
191 ] 185 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698