| 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 "nodoc": "true", | 8 "nodoc": "true", |
| 9 "events": [ | 9 "events": [ |
| 10 { | 10 { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 "DANGER_URL": { | 61 "DANGER_URL": { |
| 62 "type": "string", | 62 "type": "string", |
| 63 "value": "url", | 63 "value": "url", |
| 64 "description": "The download's URL is malicious." | 64 "description": "The download's URL is malicious." |
| 65 }, | 65 }, |
| 66 "DANGER_CONTENT": { | 66 "DANGER_CONTENT": { |
| 67 "type": "string", | 67 "type": "string", |
| 68 "value": "content", | 68 "value": "content", |
| 69 "description": "The download's content is malicious." | 69 "description": "The download's content is malicious." |
| 70 }, | 70 }, |
| 71 "DANGER_UNCOMMON": { |
| 72 "type": "string", |
| 73 "value": "uncommon", |
| 74 "description": "The download is not commonly downloaded and could be dan
gerous." |
| 75 }, |
| 71 "ERROR_GENERIC": { | 76 "ERROR_GENERIC": { |
| 72 "type": "string", | 77 "type": "string", |
| 73 "value": "I'm afraid I can't do that.", | 78 "value": "I'm afraid I can't do that.", |
| 74 "description": "Generic error." | 79 "description": "Generic error." |
| 75 }, | 80 }, |
| 76 "ERROR_INVALID_URL": { | 81 "ERROR_INVALID_URL": { |
| 77 "type": "string", | 82 "type": "string", |
| 78 "value": "Invalid URL.", | 83 "value": "Invalid URL.", |
| 79 "description": "The URL was invalid." | 84 "description": "The URL was invalid." |
| 80 }, | 85 }, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 97 "binaryValue": { | 102 "binaryValue": { |
| 98 "type": "array", | 103 "type": "array", |
| 99 "optional": true, | 104 "optional": true, |
| 100 "description": "Value of the HTTP header if it cannot be represent
ed by UTF-8, stored as individual byte values (0..255).", | 105 "description": "Value of the HTTP header if it cannot be represent
ed by UTF-8, stored as individual byte values (0..255).", |
| 101 "items": {"type": "integer"} | 106 "items": {"type": "integer"} |
| 102 } | 107 } |
| 103 } | 108 } |
| 104 } | 109 } |
| 105 }, | 110 }, |
| 106 { | 111 { |
| 112 "id": "DownloadDangerType", |
| 113 "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.", |
| 114 "type": "string", |
| 115 "enum": ["safe", "file", "url", "content", "uncommon"] |
| 116 }, |
| 117 { |
| 107 "id": "DownloadItem", | 118 "id": "DownloadItem", |
| 108 "type": "object", | 119 "type": "object", |
| 109 "description": "The state of a file as it is downloaded from the interne
t.", | 120 "description": "The state of a file as it is downloaded from the interne
t.", |
| 110 "properties": { | 121 "properties": { |
| 111 "id": { | 122 "id": { |
| 112 "type": "integer", | 123 "type": "integer", |
| 113 "description": "An identifier that is persistent across browser sess
ions." | 124 "description": "An identifier that is persistent across browser sess
ions." |
| 114 }, | 125 }, |
| 115 "url": { | 126 "url": { |
| 116 "type": "string", | 127 "type": "string", |
| 117 "description": "absolute URL" | 128 "description": "absolute URL" |
| 118 }, | 129 }, |
| 119 "filename": { | 130 "filename": { |
| 120 "type": "string", | 131 "type": "string", |
| 121 "description": "absolute local path" | 132 "description": "absolute local path" |
| 122 }, | 133 }, |
| 123 "danger": { | 134 "danger": { |
| 124 "type": "string", | 135 "$ref": "DownloadDangerType", |
| 125 "description": "Indication of whether this download is thought to be
safe or known to be suspicious.", | 136 "description": "Indication of whether this download is thought to be
safe or known to be suspicious.", |
| 126 "enum": ["safe", "file", "url", "content"], | |
| 127 "optional": true | 137 "optional": true |
| 128 }, | 138 }, |
| 129 "dangerAccepted": { | 139 "dangerAccepted": { |
| 130 "type": "boolean", | 140 "type": "boolean", |
| 131 "description": "true if the user has accepted the download's danger.
", | 141 "description": "true if the user has accepted the download's danger.
", |
| 132 "optional": true | 142 "optional": true |
| 133 }, | 143 }, |
| 134 "mime": { | 144 "mime": { |
| 135 "type": "string", | 145 "type": "string", |
| 136 "description": "The file's MIME type." | 146 "description": "The file's MIME type." |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 "type": "string", | 288 "type": "string", |
| 279 "optional": true, | 289 "optional": true, |
| 280 "description": "absolute URL" | 290 "description": "absolute URL" |
| 281 }, | 291 }, |
| 282 "filename": { | 292 "filename": { |
| 283 "type": "string", | 293 "type": "string", |
| 284 "optional": true, | 294 "optional": true, |
| 285 "description": "absolute local path" | 295 "description": "absolute local path" |
| 286 }, | 296 }, |
| 287 "danger": { | 297 "danger": { |
| 288 "type": "string", | 298 "$ref": "DownloadDangerType", |
| 289 "description": "Indication of whether this download is thought to be
safe or known to be suspicious.", | 299 "description": "Indication of whether this download is thought to be
safe or known to be suspicious.", |
| 290 "enum": ["safe", "file", "url"], | |
| 291 "optional": true | 300 "optional": true |
| 292 }, | 301 }, |
| 293 "dangerAccepted": { | 302 "dangerAccepted": { |
| 294 "type": "boolean", | 303 "type": "boolean", |
| 295 "optional": true, | 304 "optional": true, |
| 296 "description": "true if the user has accepted the download's danger.
" | 305 "description": "true if the user has accepted the download's danger.
" |
| 297 }, | 306 }, |
| 298 "mime": { | 307 "mime": { |
| 299 "type": "string", | 308 "type": "string", |
| 300 "optional": true, | 309 "optional": true, |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 "type": "string", | 625 "type": "string", |
| 617 "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." | 626 "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." |
| 618 } | 627 } |
| 619 ] | 628 ] |
| 620 } | 629 } |
| 621 ] | 630 ] |
| 622 } | 631 } |
| 623 ] | 632 ] |
| 624 } | 633 } |
| 625 ] | 634 ] |
| OLD | NEW |