OLD | NEW |
1 [ | 1 [ |
2 { | 2 { |
3 "namespace": "experimental.downloads", | 3 "namespace": "experimental.downloads", |
4 "nodoc": "true", | 4 "nodoc": "true", |
5 "events": [ | 5 "events": [ |
6 { | 6 { |
7 "name": "onCreated", | 7 "name": "onCreated", |
8 "type": "function", | 8 "type": "function", |
9 "description": "This event fires with the DownloadItem object when a dow
nload begins.", | 9 "description": "This event fires with the DownloadItem object when a dow
nload begins.", |
10 "parameters": [ | 10 "parameters": [ |
11 {"$ref": "DownloadItem"} | 11 {"name": "downloadItem", "$ref": "DownloadItem"} |
12 ] | 12 ] |
13 }, | 13 }, |
14 { | 14 { |
15 "name": "onChanged", | 15 "name": "onChanged", |
16 "type": "function", | 16 "type": "function", |
17 "description": "When any of a DownloadItem's properties except |bytesRec
eived| changes, this event fires with the download id and an object containing t
he properties that changed.", | 17 "description": "When any of a DownloadItem's properties except |bytesRec
eived| changes, this event fires with the download id and an object containing t
he properties that changed.", |
18 "parameters": [ | 18 "parameters": [ |
19 {"$ref": "DownloadDelta"} | 19 {"name": "downloadDelta", "$ref": "DownloadDelta"} |
20 ] | 20 ] |
21 }, | 21 }, |
22 { | 22 { |
23 "name": "onErased", | 23 "name": "onErased", |
24 "type": "function", | 24 "type": "function", |
25 "description": "Fires with the download id when a download is erased fro
m history.", | 25 "description": "Fires with the download id when a download is erased fro
m history.", |
26 "parameters": [ | 26 "parameters": [ |
27 {"type": "integer", "name": "downloadId"} | 27 {"type": "integer", "name": "downloadId"} |
28 ] | 28 ] |
29 } | 29 } |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 } | 428 } |
429 } | 429 } |
430 } | 430 } |
431 ], | 431 ], |
432 "functions": [ | 432 "functions": [ |
433 { | 433 { |
434 "name": "download", | 434 "name": "download", |
435 "type": "function", | 435 "type": "function", |
436 "description": "Download a URL. If the URL uses the HTTP[S] protocol, th
en the request will include all cookies currently set for its hostname. If the d
ownload started successfully, |callback| will be called with the new DownloadIte
m’s |id|. If there was an error starting the download, then |callback| will be c
alled with |downloadId|=undefined and chrome.extension.lastError will be set. If
the URL’s hostname is not specified in the |permissions| section of the extensi
on’s manifest, then the |chrome.extensions.lastError| object will indicate that
the extension does not have permission to access that hostname.", | 436 "description": "Download a URL. If the URL uses the HTTP[S] protocol, th
en the request will include all cookies currently set for its hostname. If the d
ownload started successfully, |callback| will be called with the new DownloadIte
m’s |id|. If there was an error starting the download, then |callback| will be c
alled with |downloadId|=undefined and chrome.extension.lastError will be set. If
the URL’s hostname is not specified in the |permissions| section of the extensi
on’s manifest, then the |chrome.extensions.lastError| object will indicate that
the extension does not have permission to access that hostname.", |
437 "parameters": [ | 437 "parameters": [ |
438 {"$ref": "DownloadOptions"}, | 438 {"name": "options", "$ref": "DownloadOptions"}, |
439 { | 439 { |
440 "name": "callback", | 440 "name": "callback", |
441 "type": "function", | 441 "type": "function", |
442 "optional": true, | 442 "optional": true, |
443 "parameters": [ | 443 "parameters": [ |
444 {"name": "id", "type": "integer"} | 444 {"name": "id", "type": "integer"} |
445 ] | 445 ] |
446 } | 446 } |
447 ] | 447 ] |
448 }, | 448 }, |
449 { | 449 { |
450 "name": "search", | 450 "name": "search", |
451 "type": "function", | 451 "type": "function", |
452 "description": "Find DownloadItems. Set |query| to the empty object to g
et all DownloadItems. To get a specific DownloadItem, set only the |id| field.", | 452 "description": "Find DownloadItems. Set |query| to the empty object to g
et all DownloadItems. To get a specific DownloadItem, set only the |id| field.", |
453 "parameters": [ | 453 "parameters": [ |
454 {"$ref": "DownloadQuery"}, | 454 {"name": "query", "$ref": "DownloadQuery"}, |
455 { | 455 { |
456 "name": "callback", | 456 "name": "callback", |
457 "type": "function", | 457 "type": "function", |
458 "optional": true, | 458 "optional": true, |
459 "parameters": [ | 459 "parameters": [ |
460 {"name": "items", "type": "array"} | 460 {"name": "items", "type": "array"} |
461 ] | 461 ] |
462 } | 462 } |
463 ] | 463 ] |
464 }, | 464 }, |
465 { | 465 { |
466 "name": "erase", | 466 "name": "erase", |
467 "type": "function", | 467 "type": "function", |
468 "description": "Erase matching DownloadItems from history", | 468 "description": "Erase matching DownloadItems from history", |
469 "parameters": [ | 469 "parameters": [ |
470 {"$ref": "DownloadQuery"}, | 470 {"name": "query", "$ref": "DownloadQuery"}, |
471 { | 471 { |
472 "name": "callback", | 472 "name": "callback", |
473 "type": "function", | 473 "type": "function", |
474 "optional": true, | 474 "optional": true, |
475 "parameters": [ | 475 "parameters": [ |
476 {"name": "ids", "type": "array"} | 476 {"name": "ids", "type": "array"} |
477 ] | 477 ] |
478 } | 478 } |
479 ] | 479 ] |
480 }, | 480 }, |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 "type": "function", | 552 "type": "function", |
553 "optional": true, | 553 "optional": true, |
554 "parameters": [], | 554 "parameters": [], |
555 "description": "Called when the request is completed. The download i
s cancelled, completed, interrupted or doesn't exist anymore." | 555 "description": "Called when the request is completed. The download i
s cancelled, completed, interrupted or doesn't exist anymore." |
556 } | 556 } |
557 ] | 557 ] |
558 } | 558 } |
559 ] | 559 ] |
560 } | 560 } |
561 ] | 561 ] |
OLD | NEW |