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

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

Issue 10855154: Update browserAction.setIcon and pageAction.setIcon for hidpi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 8 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 | 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": "browserAction", 7 "namespace": "browserAction",
8 "dependencies": [ "tabs" ], 8 "dependencies": [ "tabs" ],
9 "types": [ 9 "types": [
10 { 10 {
11 "id": "ColorArray", 11 "id": "ColorArray",
12 "type": "array", 12 "type": "array",
13 "items": { 13 "items": {
14 "type": "integer", 14 "type": "integer",
15 "minimum": 0, 15 "minimum": 0,
16 "maximum": 255 16 "maximum": 255
17 }, 17 },
18 "minItems": 4, 18 "minItems": 4,
19 "maxItems": 4 19 "maxItems": 4
20 },
21 {
22 "id": "ImageDataType",
23 "type": "object",
24 "isInstanceOf": "ImageData",
25 "additionalProperties": { "type": "any" },
26 "description": "Pixel data for an image. Must be an ImageData object (fo r example, from a <code>canvas</code> element)."
Jeffrey Yasskin 2012/08/17 23:20:28 How does Canvas.getImageDataHD() fit into all of t
tbarzic 2012/08/21 00:24:24 I don't think we support Canvas.getImageDataHD (se
20 } 27 }
21 ], 28 ],
22 "functions": [ 29 "functions": [
23 { 30 {
24 "name": "setTitle", 31 "name": "setTitle",
25 "type": "function", 32 "type": "function",
26 "description": "Sets the title of the browser action. This shows up in t he tooltip.", 33 "description": "Sets the title of the browser action. This shows up in t he tooltip.",
27 "parameters": [ 34 "parameters": [
28 { 35 {
29 "name": "details", 36 "name": "details",
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 "name": "result", 73 "name": "result",
67 "type": "string" 74 "type": "string"
68 } 75 }
69 ] 76 ]
70 } 77 }
71 ] 78 ]
72 }, 79 },
73 { 80 {
74 "name": "setIcon", 81 "name": "setIcon",
75 "type": "function", 82 "type": "function",
76 "description": "Sets the icon for the browser action. The icon can be sp ecified either as the path to an image file or as the pixel data from a canvas e lement. Either the <b>path</b> or the <b>imageData</b> property must be specifie d.", 83 "description": "Sets the icon for the browser action. The icon can be sp ecified either as the path to an image file or as the pixel data from a canvas e lement, or as dictionary of either one of those. The dictionary should contain i cons of sizes 19 and 38. Either the <b>path</b>, the <b>imageData</b>, the <b>pa thSet</b> or the <b>imageDataSet</b> property must be specified.",
77 "parameters": [ 84 "parameters": [
78 { 85 {
79 "name": "details", 86 "name": "details",
80 "type": "object", 87 "type": "object",
81 "properties": { 88 "properties": {
82 "imageData": { 89 "imageData": {
90 "$ref": "ImageDataType",
91 "optional": true
92 },
93 "imageDataSet": {
83 "type": "object", 94 "type": "object",
84 "isInstanceOf": "ImageData", 95 "description": "Data for icons of sizes 19 and 38. UI will decid e which icon to used depending on screens scale factor.",
Jeffrey Yasskin 2012/08/17 23:20:28 "screen's" Also, "scale factor" isn't very descri
tbarzic 2012/08/21 00:22:07 I guess this is a bit better, but I feel there's s
85 "additionalProperties": { "type": "any" }, 96 "optional": true,
86 "description": "Pixel data for an image. Must be an ImageData ob ject (for example, from a <code>canvas</code> element).", 97 "properties": {
87 "optional": true 98 "19": {"$ref": "ImageDataType"},
99 "38": {"$ref": "ImageDataType"}
100 }
88 }, 101 },
89 "path": { 102 "path": {
90 "type": "string", 103 "type": "string",
91 "description": "Relative path to an image in the extension to sh ow in the browser action.", 104 "description": "Relative path to an image in the extension to sh ow in the browser action.",
92 "optional": true 105 "optional": true
93 }, 106 },
107 "pathSet": {
108 "type": "object",
109 "description": "Paths to icons of sizes 19 and 38. UI will decid e which icon to used depending on screens scale factor.",
110 "optional": true,
111 "properties": {
112 "19": {
113 "type": "string",
114 "description": "Relative path to an image representation in the extension to show in the browser action at 1x scale."
115 },
116 "38": {
117 "type": "string",
118 "description": "Relative path to an image representation in the extension to show in the browser action at 2x scale."
Jeffrey Yasskin 2012/08/17 23:20:28 "at 2x scale" won't make much sense when it shows
tbarzic 2012/08/21 00:22:07 removed description from here.
119 }
120 }
121 },
94 "tabId": { 122 "tabId": {
95 "type": "integer", 123 "type": "integer",
96 "optional": true, 124 "optional": true,
97 "description": "Limits the change to when a particular tab is se lected. Automatically resets when the tab is closed." 125 "description": "Limits the change to when a particular tab is se lected. Automatically resets when the tab is closed."
98 } 126 }
99 } 127 }
100 }, 128 },
101 { 129 {
102 "type": "function", 130 "type": "function",
103 "name": "callback", 131 "name": "callback",
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 "parameters": [ 325 "parameters": [
298 { 326 {
299 "name": "tab", 327 "name": "tab",
300 "$ref": "tabs.Tab" 328 "$ref": "tabs.Tab"
301 } 329 }
302 ] 330 ]
303 } 331 }
304 ] 332 ]
305 } 333 }
306 ] 334 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698