OLD | NEW |
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": "experimental.downloads", | 7 "namespace": "experimental.downloads", |
8 "events": [ | 8 "events": [ |
9 { | 9 { |
10 "name": "onCreated", | 10 "name": "onCreated", |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 "nodoc": "true", | 70 "nodoc": "true", |
71 "value": "url", | 71 "value": "url", |
72 "description": "The download's URL is malicious." | 72 "description": "The download's URL is malicious." |
73 }, | 73 }, |
74 "DANGER_CONTENT": { | 74 "DANGER_CONTENT": { |
75 "type": "string", | 75 "type": "string", |
76 "nodoc": "true", | 76 "nodoc": "true", |
77 "value": "content", | 77 "value": "content", |
78 "description": "The download's content is malicious." | 78 "description": "The download's content is malicious." |
79 }, | 79 }, |
| 80 "DANGER_UNCOMMON": { |
| 81 "type": "string", |
| 82 "value": "uncommon", |
| 83 "description": "The download is not commonly downloaded and could be dan
gerous." |
| 84 }, |
80 "ERROR_GENERIC": { | 85 "ERROR_GENERIC": { |
81 "type": "string", | 86 "type": "string", |
82 "value": "I'm afraid I can't do that.", | 87 "value": "I'm afraid I can't do that.", |
83 "description": "Generic error." | 88 "description": "Generic error." |
84 }, | 89 }, |
85 "ERROR_INVALID_URL": { | 90 "ERROR_INVALID_URL": { |
86 "type": "string", | 91 "type": "string", |
87 "value": "Invalid URL.", | 92 "value": "Invalid URL.", |
88 "description": "The URL was invalid." | 93 "description": "The URL was invalid." |
89 }, | 94 }, |
(...skipping 17 matching lines...) Expand all Loading... |
107 "binaryValue": { | 112 "binaryValue": { |
108 "type": "array", | 113 "type": "array", |
109 "optional": true, | 114 "optional": true, |
110 "description": "Value of the HTTP header if it cannot be represent
ed by UTF-8, stored as individual byte values (0..255).", | 115 "description": "Value of the HTTP header if it cannot be represent
ed by UTF-8, stored as individual byte values (0..255).", |
111 "items": {"type": "integer"} | 116 "items": {"type": "integer"} |
112 } | 117 } |
113 } | 118 } |
114 } | 119 } |
115 }, | 120 }, |
116 { | 121 { |
| 122 "id": "DownloadDangerType", |
| 123 "description": "String indicating whether a download is known to be safe
or is considered dangerous. The values correspond to the <code>DANGER_SAFE</cod
e>, <code>DANGER_FILE</code>, <code>DANGER_URL</code>, <code>DANGER_CONTENT</cod
e>, and <code>DANGER_UNCOMMON</code> properties.", |
| 124 "type": "string", |
| 125 "enum": ["safe", "file", "url", "content", "uncommon"] |
| 126 }, |
| 127 { |
117 "id": "DownloadItem", | 128 "id": "DownloadItem", |
118 "type": "object", | 129 "type": "object", |
119 "nodoc": "true", | 130 "nodoc": "true", |
120 "description": "The state of a file as it is downloaded from the interne
t.", | 131 "description": "The state of a file as it is downloaded from the interne
t.", |
121 "properties": { | 132 "properties": { |
122 "id": { | 133 "id": { |
123 "type": "integer", | 134 "type": "integer", |
124 "description": "An identifier that is persistent across browser sess
ions." | 135 "description": "An identifier that is persistent across browser sess
ions." |
125 }, | 136 }, |
126 "url": { | 137 "url": { |
127 "type": "string", | 138 "type": "string", |
128 "description": "absolute URL" | 139 "description": "absolute URL" |
129 }, | 140 }, |
130 "filename": { | 141 "filename": { |
131 "type": "string", | 142 "type": "string", |
132 "description": "absolute local path" | 143 "description": "absolute local path" |
133 }, | 144 }, |
134 "danger": { | 145 "danger": { |
135 "type": "string", | 146 "$ref": "DownloadDangerType", |
136 "description": "Indication of whether this download is thought to be
safe or known to be suspicious.", | 147 "description": "Indication of whether this download is thought to be
safe or known to be suspicious.", |
137 "enum": ["safe", "file", "url", "content"], | |
138 "optional": true | 148 "optional": true |
139 }, | 149 }, |
140 "dangerAccepted": { | 150 "dangerAccepted": { |
141 "type": "boolean", | 151 "type": "boolean", |
142 "description": "true if the user has accepted the download's danger.
", | 152 "description": "true if the user has accepted the download's danger.
", |
143 "optional": true | 153 "optional": true |
144 }, | 154 }, |
145 "mime": { | 155 "mime": { |
146 "type": "string", | 156 "type": "string", |
147 "description": "The file's MIME type." | 157 "description": "The file's MIME type." |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 "type": "string", | 263 "type": "string", |
254 "optional": true, | 264 "optional": true, |
255 "description": "absolute URL" | 265 "description": "absolute URL" |
256 }, | 266 }, |
257 "filename": { | 267 "filename": { |
258 "type": "string", | 268 "type": "string", |
259 "optional": true, | 269 "optional": true, |
260 "description": "absolute local path" | 270 "description": "absolute local path" |
261 }, | 271 }, |
262 "danger": { | 272 "danger": { |
263 "type": "string", | 273 "$ref": "DownloadDangerType", |
264 "description": "Indication of whether this download is thought to be
safe or known to be suspicious.", | 274 "description": "Indication of whether this download is thought to be
safe or known to be suspicious.", |
265 "enum": ["safe", "file", "url"], | |
266 "optional": true | 275 "optional": true |
267 }, | 276 }, |
268 "dangerAccepted": { | 277 "dangerAccepted": { |
269 "type": "boolean", | 278 "type": "boolean", |
270 "optional": true, | 279 "optional": true, |
271 "description": "true if the user has accepted the download's danger.
" | 280 "description": "true if the user has accepted the download's danger.
" |
272 }, | 281 }, |
273 "mime": { | 282 "mime": { |
274 "type": "string", | 283 "type": "string", |
275 "optional": true, | 284 "optional": true, |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 "type": "string", | 652 "type": "string", |
644 "description": "A URL to an image that represents the download.
If a file icon cannot be determined, chrome.extension.lastError will contain an
error message." | 653 "description": "A URL to an image that represents the download.
If a file icon cannot be determined, chrome.extension.lastError will contain an
error message." |
645 } | 654 } |
646 ] | 655 ] |
647 } | 656 } |
648 ] | 657 ] |
649 } | 658 } |
650 ] | 659 ] |
651 } | 660 } |
652 ] | 661 ] |
OLD | NEW |