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

Side by Side Diff: tools/json_schema_compiler/test/browserAction.json

Issue 10272021: Files generated by the JSON schema compiler are named incorrectly (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Minor changes Created 8 years, 7 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
(Empty)
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
3 // found in the LICENSE file.
4
5 [
6 {
7 "namespace": "browserAction",
8 "dependencies": [ "tabs" ],
9 "types": [
10 {
11 "id": "ColorArray",
12 "type": "array",
13 "items": {
14 "type": "integer",
15 "minimum": 0,
16 "maximum": 255
17 },
18 "minItems": 4,
19 "maxItems": 4
20 }
21 ],
22 "functions": [
23 {
24 "name": "setTitle",
25 "type": "function",
26 "description": "Sets the title of the browser action. This shows up in t he tooltip.",
27 "parameters": [
28 {
29 "name": "details",
30 "type": "object",
31 "properties": {
32 "title": {
33 "type": "string",
34 "description": "The string the browser action should display whe n moused over."
35 },
36 "tabId": {
37 "type": "integer",
38 "optional": true,
39 "description": "Limits the change to when a particular tab is se lected. Automatically resets when the tab is closed."
40 }
41 }
42 }
43 ]
44 },
45 {
46 "name": "getTitle",
47 "type": "function",
48 "description": "Gets the title of the browser action.",
49 "parameters": [
50 {
51 "name": "details",
52 "type": "object",
53 "properties": {
54 "tabId": {
55 "type": "integer",
56 "optional": true,
57 "description": "Specify the tab to get the title from. If no tab is specified, the non-tab-specific title is returned."
58 }
59 }
60 },
61 {
62 "type": "function",
63 "name": "callback",
64 "parameters": [
65 {
66 "name": "result",
67 "type": "string"
68 }
69 ]
70 }
71 ]
72 },
73 {
74 "name": "setIcon",
75 "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.",
77 "parameters": [
78 {
79 "name": "details",
80 "type": "object",
81 "properties": {
82 "imageData": {
83 "type": "object",
84 "isInstanceOf": "ImageData",
85 "additionalProperties": { "type": "any" },
86 "description": "Pixel data for an image. Must be an ImageData ob ject (for example, from a <code>canvas</code> element).",
87 "optional": true
88 },
89 "path": {
90 "type": "string",
91 "description": "Relative path to an image in the extension to sh ow in the browser action.",
92 "optional": true
93 },
94 "tabId": {
95 "type": "integer",
96 "optional": true,
97 "description": "Limits the change to when a particular tab is se lected. Automatically resets when the tab is closed."
98 }
99 }
100 }
101 ]
102 },
103 {
104 "name": "setPopup",
105 "type": "function",
106 "description": "Sets the html document to be opened as a popup when the user clicks on the browser action's icon.",
107 "parameters": [
108 {
109 "name": "details",
110 "type": "object",
111 "properties": {
112 "tabId": {
113 "type": "integer",
114 "optional": true,
115 "minimum": 0,
116 "description": "Limits the change to when a particular tab is se lected. Automatically resets when the tab is closed."
117 },
118 "popup": {
119 "type": "string",
120 "description": "The html file to show in a popup. If set to the empty string (''), no popup is shown."
121 }
122 }
123 }
124 ]
125 },
126 {
127 "name": "getPopup",
128 "type": "function",
129 "description": "Gets the html document set as the popup for this browser action.",
130 "parameters": [
131 {
132 "name": "details",
133 "type": "object",
134 "properties": {
135 "tabId": {
136 "type": "integer",
137 "optional": true,
138 "description": "Specify the tab to get the popup from. If no tab is specified, the non-tab-specific popup is returned."
139 }
140 }
141 },
142 {
143 "type": "function",
144 "name": "callback",
145 "parameters": [
146 {
147 "name": "result",
148 "type": "string"
149 }
150 ]
151 }
152 ]
153 },
154 {
155 "name": "setBadgeText",
156 "type": "function",
157 "description": "Sets the badge text for the browser action. The badge is displayed on top of the icon.",
158 "parameters": [
159 {
160 "name": "details",
161 "type": "object",
162 "properties": {
163 "text": {
164 "type": "string",
165 "description": "Any number of characters can be passed, but only about four can fit in the space."
166 },
167 "tabId": {
168 "type": "integer",
169 "optional": true,
170 "description": "Limits the change to when a particular tab is se lected. Automatically resets when the tab is closed."
171 }
172 }
173 }
174 ]
175 },
176 {
177 "name": "getBadgeText",
178 "type": "function",
179 "description": "Gets the badge text of the browser action. If no tab is specified, the non-tab-specific badge text is returned.",
180 "parameters": [
181 {
182 "name": "details",
183 "type": "object",
184 "properties": {
185 "tabId": {
186 "type": "integer",
187 "optional": true,
188 "description": "Specify the tab to get the badge text from. If n o tab is specified, the non-tab-specific badge text is returned."
189 }
190 }
191 },
192 {
193 "type": "function",
194 "name": "callback",
195 "parameters": [
196 {
197 "name": "result",
198 "type": "string"
199 }
200 ]
201 }
202 ]
203 },
204 {
205 "name": "setBadgeBackgroundColor",
206 "type": "function",
207 "description": "Sets the background color for the badge.",
208 "parameters": [
209 {
210 "name": "details",
211 "type": "object",
212 "properties": {
213 "color": {
214 "description": "An array of four integers in the range [0,255] t hat make up the RGBA color of the badge. For example, opaque red is <code>[255, 0, 0, 255]</code>. Can also be a string with a CSS value, with opaque red being <code>#FF0000</code> or <code>#F00</code>.",
215 "choices": [
216 {"type": "string"},
217 {"$ref": "ColorArray"}
218 ]
219 },
220 "tabId": {
221 "type": "integer",
222 "optional": true,
223 "description": "Limits the change to when a particular tab is se lected. Automatically resets when the tab is closed."
224 }
225 }
226 }
227 ]
228 },
229 {
230 "name": "getBadgeBackgroundColor",
231 "type": "function",
232 "description": "Gets the background color of the browser action.",
233 "parameters": [
234 {
235 "name": "details",
236 "type": "object",
237 "properties": {
238 "tabId": {
239 "type": "integer",
240 "optional": true,
241 "description": "Specify the tab to get the badge background colo r from. If no tab is specified, the non-tab-specific badge background color is r eturned."
242 }
243 }
244 },
245 {
246 "type": "function",
247 "name": "callback",
248 "parameters": [
249 {
250 "name": "result",
251 "$ref": "ColorArray"
252 }
253 ]
254 }
255 ]
256 }
257 ],
258 "events": [
259 {
260 "name": "onClicked",
261 "type": "function",
262 "description": "Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup.",
263 "parameters": [
264 {
265 "name": "tab",
266 "$ref": "Tab"
267 }
268 ]
269 }
270 ]
271 }
272 ]
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/test/additional_properties_unittest.cc ('k') | tools/json_schema_compiler/test/browser_action.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698