OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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": "extensionTypes", | 7 "namespace": "extensionTypes", |
8 "description": "The <code>chrome.extensionTypes</code> API contains type dec
larations for Chrome extensions.", | 8 "description": "The <code>chrome.extensionTypes</code> API contains type dec
larations for Chrome extensions.", |
9 "types": [ | 9 "types": [ |
10 { | 10 { |
11 "id": "ImageDetails", | 11 "id": "ImageDetails", |
12 "type": "object", | 12 "type": "object", |
13 "description": "Details about the format and quality of an image.", | 13 "description": "Details about the format and quality of an image.", |
14 "properties": { | 14 "properties": { |
15 "format": { | 15 "format": { |
16 "type": "string", | 16 "type": "string", |
17 "optional": true, | 17 "optional": true, |
18 "enum": ["jpeg", "png"], | 18 "enum": ["jpeg", "png"], |
19 "description": "The format of the resulting image. Default is <code
>\"jpeg\"</code>." | 19 "description": "The format of the resulting image. Default is <code
>\"jpeg\"</code>." |
20 }, | 20 }, |
21 "quality": { | 21 "quality": { |
22 "type": "integer", | 22 "type": "integer", |
23 "optional": true, | 23 "optional": true, |
24 "minimum": 0, | 24 "minimum": 0, |
25 "maximum": 100, | 25 "maximum": 100, |
26 "description": "When format is <code>\"jpeg\"</code>, controls the q
uality of the resulting image. This value is ignored for PNG images. As qualit
y is decreased, the resulting image will have more visual artifacts, and the num
ber of bytes needed to store it will decrease." | 26 "description": "When format is <code>\"jpeg\"</code>, controls the q
uality of the resulting image. This value is ignored for PNG images. As qualit
y is decreased, the resulting image will have more visual artifacts, and the num
ber of bytes needed to store it will decrease." |
27 } | 27 } |
28 } | 28 } |
| 29 }, |
| 30 { |
| 31 "id": "InjectDetails", |
| 32 "type": "object", |
| 33 "description": "Details of the script or CSS to inject. Either the code
or the file property must be set, but both may not be set at the same time.", |
| 34 "properties": { |
| 35 "code": {"type": "string", "optional": true, "description": "JavaScrip
t or CSS code to inject.<br><br><b>Warning:</b><br>Be careful using the <code>co
de</code> parameter. Incorrect use of it may open your extension to <a href=\"ht
tps://en.wikipedia.org/wiki/Cross-site_scripting\">cross site scripting</a> atta
cks."}, |
| 36 "file": {"type": "string", "optional": true, "description": "JavaScrip
t or CSS file to inject."}, |
| 37 "allFrames": {"type": "boolean", "optional": true, "description": "If
allFrames is <code>true</code>, implies that the JavaScript or CSS should be inj
ected into all frames of current page. By default, it's <code>false</code> and i
s only injected into the top frame."}, |
| 38 "matchAboutBlank": {"type": "boolean", "optional": true, "description"
: "If matchAboutBlank is true, then the code is also injected in about:blank and
about:srcdoc frames if your extension has access to its parent document. Code c
annot be inserted in top-level about:-frames. By default it is <code>false</code
>."}, |
| 39 "runAt": { |
| 40 "type": "string", |
| 41 "optional": true, |
| 42 "enum": ["document_start", "document_end", "document_idle"], |
| 43 "description": "The soonest that the JavaScript or CSS will be injec
ted into the tab. Defaults to \"document_idle\"." |
| 44 } |
| 45 } |
29 } | 46 } |
30 ] | 47 ] |
31 } | 48 } |
32 ] | 49 ] |
OLD | NEW |