Battery Status API: add UMA logging for Linux.
[chromium-blink-merge.git] / tools / json_schema_compiler / test / font_settings.json
blob01c49f7090f6b9d662391fda90caa9467bbfc320
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.
6   {
7     "namespace": "fontSettings",
8     "description": "The fontSettings API.",
9     "types": [
10       {
11         "id": "FontName",
12         "type": "object",
13         "description": "Represents a font name.",
14         "properties": {
15           "fontName": {
16             "type": "string",
17             "description": "The font name."
18           },
19           "localizedName": {
20             "type": "string",
21             "description": "The font name localized for the current locale."
22           }
23         }
24       },
25       {
26         "id": "FakeStringType",
27         "type": "string",
28         "description": "Used to test a string type."
29       },
30       {
31         "id": "GenericFamily",
32         "type": "string",
33         "enum": ["standard", "sansserif", "serif", "fixed", "cursive", "fantasy"],
34         "description": "A CSS generic font family."
35       },
36       {
37         "id": "LevelOfControl",
38         "description": "One of<br><var>not_controllable</var>: cannot be controlled by any extension<br><var>controlled_by_other_extensions</var>: controlled by extensions with higher precedence<br><var>controllable_by_this_extension</var>: can be controlled by this extension<br><var>controlled_by_this_extension</var>: controlled by this extension",
39         "type": "string",
40         "enum": ["not_controllable", "controlled_by_other_extensions", "controllable_by_this_extension", "controlled_by_this_extension"]
41       }
42     ],
43     "functions": [
44       {
45         "name": "clearFont",
46         "description": "Clears the font set by this extension, if any.",
47         "parameters": [
48           {
49             "name": "details",
50             "type": "object",
51             "properties": {
52               "script": {
53                 "$ref": "FakeStringType",
54                 "description": "The script for which the font should be cleared. If omitted, the global script font setting is cleared.",
55                 "optional": true
56               },
57               "genericFamily": {
58                 "$ref": "GenericFamily",
59                 "description": "The generic font family for which the font should be cleared."
60               }
61             }
62           },
63           {
64             "type": "function",
65             "name": "callback",
66             "optional": true,
67             "parameters": []
68           }
69         ]
70       },
71       {
72         "name": "getFont",
73         "description": "Gets the font for a given script and generic font family.",
74         "parameters": [
75           {
76             "name": "details",
77             "type": "object",
78             "properties": {
79               "script": {
80                 "$ref": "FakeStringType",
81                 "description": "The script for which the font should be retrieved. If omitted, the font for the global script is retrieved.",
82                 "optional": true
83               },
84               "genericFamily": {
85                 "$ref": "GenericFamily",
86                 "description": "The generic font family for which the font should be retrieved."
87               }
88             }
89           },
90           {
91             "type": "function",
92             "name": "callback",
93             "optional": true,
94             "parameters": [
95               {
96                 "name": "details",
97                 "type": "object",
98                 "properties": {
99                   "fontName": {
100                     "type": "string",
101                     "description": "The font name. Rather than the literal font name preference value, this may be the name of the font that the system resolves the preference value to. The empty string signifies fallback to the global script font setting."
102                   }
103                 }
104               }
105             ]
106           }
107         ]
108       },
109       {
110         "name": "setFont",
111         "description": "Sets the font for a given script and generic font family.",
112         "parameters": [
113           {
114             "name": "details",
115             "type": "object",
116             "properties": {
117               "script": {
118                 "$ref": "FakeStringType",
119                 "description": "The script code which the font should be set. If omitted, the font for the global script is set.",
120                 "optional": true
121               },
122               "genericFamily": {
123                 "$ref": "GenericFamily",
124                 "description": "The generic font family for which the font should be set."
125               },
126               "fontName": {
127                 "type": "string",
128                 "description": "The font name. If a script is specified, the empty string means to fallback to the global script font setting."
129               }
130             }
131           },
132           {
133             "type": "function",
134             "name": "callback",
135             "optional": true,
136             "parameters": []
137           }
138         ]
139       },
140       {
141         "name": "getFontList",
142         "description": "Gets a list of fonts on the system.",
143         "parameters": [
144           {
145             "type": "function",
146             "name": "callback",
147             "parameters": [
148               {
149                 "name": "results",
150                 "type": "array",
151                 "items": { "$ref": "FontName" }
152               }
153             ]
154           }
155         ]
156       },
157       {
158         "name": "clearDefaultFontSize",
159         "description": "Clears the default font size set by this extension, if any.",
160         "parameters": [
161           {
162             "name": "details",
163             "type": "object",
164             "optional": true,
165             "description": "This parameter is currently unused.",
166             "properties": {}
167           },
168           {
169             "type": "function",
170             "name": "callback",
171             "optional": true,
172             "parameters": []
173           }
174         ]
175       },
176       {
177         "name": "getDefaultFontSize",
178         "description": "Gets the default font size.",
179         "parameters": [
180           {
181             "name": "details",
182             "type": "object",
183             "optional": true,
184             "description": "This parameter is currently unused.",
185             "properties": {}
186           },
187           {
188             "name": "callback",
189             "type": "function",
190             "optional": true,
191             "parameters": [
192               {
193                 "name": "details",
194                 "type": "object",
195                 "properties": {
196                   "pixelSize": {
197                     "type": "integer",
198                     "description": "The font size in pixels."
199                   }
200                 }
201               }
202             ]
203           }
204         ]
205       },
206       {
207         "name": "setDefaultFontSize",
208         "description": "Sets the default font size.",
209         "parameters": [
210           {
211             "name": "details",
212             "type": "object",
213             "properties": {
214               "pixelSize": {
215                 "type": "integer",
216                 "description": "The font size in pixels."
217               }
218             }
219           },
220           {
221             "type": "function",
222             "name": "callback",
223             "optional": true,
224             "parameters": []
225           }
226         ]
227       },
228       {
229         "name": "clearDefaultFixedFontSize",
230         "description": "Clears the default fixed font size set by this extension, if any.",
231         "parameters": [
232           {
233             "name": "details",
234             "type": "object",
235             "optional": true,
236             "description": "This parameter is currently unused.",
237             "properties": {}
238           },
239           {
240             "type": "function",
241             "name": "callback",
242             "optional": true,
243             "parameters": []
244           }
245         ]
246       },
247       {
248         "name": "getDefaultFixedFontSize",
249         "description": "Gets the default size for fixed width fonts.",
250         "parameters": [
251           {
252             "name": "details",
253             "type": "object",
254             "optional": true,
255             "description": "This parameter is currently unused.",
256             "properties": {}
257           },
258           {
259             "name": "callback",
260             "type": "function",
261             "optional": true,
262             "parameters": [
263               {
264                 "name": "details",
265                 "type": "object",
266                 "properties": {
267                   "pixelSize": {
268                     "type": "integer",
269                     "description": "The font size in pixels."
270                   }
271                 }
272               }
273             ]
274           }
275         ]
276       },
277       {
278         "name": "setDefaultFixedFontSize",
279         "description": "Sets the default size for fixed width fonts.",
280         "parameters": [
281           {
282             "name": "details",
283             "type": "object",
284             "properties": {
285               "pixelSize": {
286                 "type": "integer",
287                 "description": "The font size in pixels."
288               }
289             }
290           },
291           {
292             "type": "function",
293             "name": "callback",
294             "optional": true,
295             "parameters": []
296           }
297         ]
298       },
299       {
300         "name": "clearMinimumFontSize",
301         "description": "Clears the minimum font size set by this extension, if any.",
302         "parameters": [
303           {
304             "name": "details",
305             "type": "object",
306             "optional": true,
307             "description": "This parameter is currently unused.",
308             "properties": {}
309           },
310           {
311             "type": "function",
312             "name": "callback",
313             "optional": true,
314             "parameters": []
315           }
316         ]
317       },
318       {
319         "name": "getMinimumFontSize",
320         "description": "Gets the minimum font size.",
321         "parameters": [
322           {
323             "name": "details",
324             "type": "object",
325             "optional": true,
326             "description": "This parameter is currently unused.",
327             "properties": {}
328           },
329           {
330             "name": "callback",
331             "type": "function",
332             "optional": true,
333             "parameters": [
334               {
335                 "name": "details",
336                 "type": "object",
337                 "properties": {
338                   "pixelSize": {
339                     "type": "integer",
340                     "description": "The font size in pixels."
341                   }
342                 }
343               }
344             ]
345           }
346         ]
347       },
348       {
349         "name": "setMinimumFontSize",
350         "description": "Sets the minimum font size.",
351         "parameters": [
352           {
353             "name": "details",
354             "type": "object",
355             "properties": {
356               "pixelSize": {
357                 "type": "integer",
358                 "description": "The font size in pixels."
359               }
360             }
361           },
362           {
363             "type": "function",
364             "name": "callback",
365             "optional": true,
366             "parameters": []
367           }
368         ]
369       },
370       {
371         "name": "clearDefaultCharacterSet",
372         "description": "Clears the default character set set by this extension, if any.",
373         "parameters": [
374           {
375             "name": "details",
376             "type": "object",
377             "optional": true,
378             "description": "This parameter is currently unused.",
379             "properties": {}
380           },
381           {
382             "type": "function",
383             "name": "callback",
384             "optional": true,
385             "parameters": []
386           }
387         ]
388       },
389       {
390         "name": "getDefaultCharacterSet",
391         "description": "Gets the default character set.",
392         "parameters": [
393           {
394             "name": "details",
395             "type": "object",
396             "optional": true,
397             "description": "This parameter is currently unused.",
398             "properties": {}
399           },
400           {
401             "name": "callback",
402             "type": "function",
403             "optional": true,
404             "parameters": [
405               {
406                 "name": "details",
407                 "type": "object",
408                 "properties": {
409                   "charset": {
410                     "type": "string",
411                     "description": "The default character set, such as \"ISO-8859-1\"."
412                   }
413                 }
414               }
415             ]
416           }
417         ]
418       },
419       {
420         "name": "setDefaultCharacterSet",
421         "description": "Sets the default character set.",
422         "parameters": [
423           {
424             "name": "details",
425             "type": "object",
426             "properties": {
427               "charset": {
428                 "type": "string",
429                 "description": "The character set."
430               }
431             }
432           },
433           {
434             "name": "callback",
435             "type": "function",
436             "optional": true,
437             "parameters": []
438           }
439         ]
440       }
441     ],
442     "events": [
443       {
444         "name": "onFontChanged",
445         "description": "Fired when a font setting changes.",
446         "parameters": [
447           {
448             "type": "object",
449             "name": "details",
450             "properties": {
451               "fontName": { "type": "string" },
452               "script": {
453                 "$ref": "FakeStringType",
454                 "description": "The script code for which the font setting has changed. If omitted, the global script font setting has changed.",
455                 "optional": true
456               },
457               "genericFamily": {
458                 "$ref": "GenericFamily",
459                 "description": "The generic font family for which the font setting has changed."
460               },
461               "levelOfControl": {
462                 "$ref": "LevelOfControl",
463                 "description": "The level of control this extension has over the setting."
464               }
465             }
466           }
467         ]
468       },
469       {
470         "name": "onDefaultFontSizeChanged",
471         "description": "Fired when the default font size setting changes.",
472         "parameters": [
473           {
474             "type": "object",
475             "name": "details",
476             "properties": {
477               "pixelSize": {
478                 "type": "integer",
479                 "description": "The font size in pixels."
480               },
481               "levelOfControl": {
482                 "$ref": "LevelOfControl",
483                 "description": "The level of control this extension has over the setting."
484               }
485             }
486           }
487         ]
488       },
489       {
490         "name": "onDefaultFixedFontSizeChanged",
491         "description": "Fired when the default fixed font size setting changes.",
492         "parameters": [
493           {
494             "type": "object",
495             "name": "details",
496             "properties": {
497               "pixelSize": {
498                 "type": "integer",
499                 "description": "The font size in pixels."
500               },
501               "levelOfControl": {
502                 "$ref": "LevelOfControl",
503                 "description": "The level of control this extension has over the setting."
504               }
505             }
506           }
507         ]
508       },
509       {
510         "name": "onMinimumFontSizeChanged",
511         "description": "Fired when the minimum font size setting changes.",
512         "parameters": [
513           {
514             "type": "object",
515             "name": "details",
516             "properties": {
517               "pixelSize": {
518                 "type": "integer",
519                 "description": "The font size in pixels."
520               },
521               "levelOfControl": {
522                 "$ref": "LevelOfControl",
523                 "description": "The level of control this extension has over the setting."
524               }
525             }
526           }
527         ]
528       },
529       {
530         "name": "onDefaultCharacterSetChanged",
531         "description": "Fired when the default character set setting changes.",
532         "parameters": [
533           {
534             "type": "object",
535             "name": "details",
536             "properties": {
537               "charset": {
538                 "type": "string",
539                 "description": "The character set."
540               },
541               "levelOfControl": {
542                 "$ref": "LevelOfControl",
543                 "description": "The level of control this extension has over the setting."
544               }
545             }
546           }
547         ]
548       }
549     ]
550   }