Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Side by Side Diff: chrome/common/extensions/api/experimental.downloads.json

Issue 9452019: experimental.downloads extension api docs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 [ 1 [
2 { 2 {
3 "namespace": "experimental.downloads", 3 "namespace": "experimental.downloads",
4 "nodoc": "true",
5 "events": [ 4 "events": [
6 { 5 {
7 "name": "onCreated", 6 "name": "onCreated",
8 "type": "function", 7 "type": "function",
9 "description": "This event fires with the DownloadItem object when a dow nload begins.", 8 "description": "This event fires with the DownloadItem object when a dow nload begins.",
10 "parameters": [ 9 "parameters": [
11 {"name": "downloadItem", "$ref": "DownloadItem"} 10 {"name": "downloadItem", "$ref": "DownloadItem"}
12 ] 11 ]
13 }, 12 },
14 { 13 {
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 "optional": true, 489 "optional": true,
491 "parameters": [ 490 "parameters": [
492 {"name": "items", "type": "array"} 491 {"name": "items", "type": "array"}
493 ] 492 ]
494 } 493 }
495 ] 494 ]
496 }, 495 },
497 { 496 {
498 "name": "erase", 497 "name": "erase",
499 "type": "function", 498 "type": "function",
499 "nodoc": "true",
500 "description": "Erase matching DownloadItems from history", 500 "description": "Erase matching DownloadItems from history",
501 "parameters": [ 501 "parameters": [
502 {"name": "query", "$ref": "DownloadQuery"}, 502 {"name": "query", "$ref": "DownloadQuery"},
503 { 503 {
504 "name": "callback", 504 "name": "callback",
505 "type": "function", 505 "type": "function",
506 "optional": true, 506 "optional": true,
507 "parameters": [ 507 "parameters": [
508 {"name": "ids", "type": "array"} 508 {"name": "ids", "type": "array"}
509 ] 509 ]
510 } 510 }
511 ] 511 ]
512 }, 512 },
513 { 513 {
514 "name": "setDestination", 514 "name": "setDestination",
515 "type": "function", 515 "type": "function",
516 "nodoc": "true",
516 "description": "Move the file to Downloads/relativePath instead of the D ownloads directory if it has completed and pass true to callback. If |relativePa th| specifies a directory that does not exist then it will be created. If it has not completed, store |relativePath| such that the file will be moved there when it completes and pass true to callback without waiting for the download to comp lete. Does nothing if the download is cancelled or if |downloadId| does not refe rence an existing DownloadItem, but pass false to callback. If the file could no t be moved, then the DownloadItem will transition to STATE_INTERRUPTED, its |err or| property will be set accordingly, false will be passed to callback, and the OnChanged event will fire.", 517 "description": "Move the file to Downloads/relativePath instead of the D ownloads directory if it has completed and pass true to callback. If |relativePa th| specifies a directory that does not exist then it will be created. If it has not completed, store |relativePath| such that the file will be moved there when it completes and pass true to callback without waiting for the download to comp lete. Does nothing if the download is cancelled or if |downloadId| does not refe rence an existing DownloadItem, but pass false to callback. If the file could no t be moved, then the DownloadItem will transition to STATE_INTERRUPTED, its |err or| property will be set accordingly, false will be passed to callback, and the OnChanged event will fire.",
517 "parameters": [ 518 "parameters": [
518 {"name": "id", "type": "integer"}, 519 {"name": "id", "type": "integer"},
519 {"name": "relativePath", "type": "string"} 520 {"name": "relativePath", "type": "string"}
520 ] 521 ]
521 }, 522 },
522 { 523 {
523 "name": "acceptDanger", 524 "name": "acceptDanger",
524 "type": "function", 525 "type": "function",
526 "nodoc": "true",
525 "description": "Accept a dangerous download. If a download is dangerous, then it will not transition to the completed state until this function is calle d.", 527 "description": "Accept a dangerous download. If a download is dangerous, then it will not transition to the completed state until this function is calle d.",
526 "parameters": [ 528 "parameters": [
527 {"name": "id", "type": "integer"} 529 {"name": "id", "type": "integer"}
528 ] 530 ]
529 }, 531 },
530 { 532 {
531 "name": "show", 533 "name": "show",
532 "type": "function", 534 "type": "function",
535 "nodoc": "true",
533 "description": "Show the downloaded file in its folder.", 536 "description": "Show the downloaded file in its folder.",
534 "parameters": [ 537 "parameters": [
535 {"name": "id", "type": "integer"} 538 {"name": "id", "type": "integer"}
536 ] 539 ]
537 }, 540 },
538 { 541 {
539 "name": "drag", 542 "name": "drag",
540 "type": "function", 543 "type": "function",
544 "nodoc": "true",
541 "description": "Drag the file to another application", 545 "description": "Drag the file to another application",
542 "parameters": [ 546 "parameters": [
543 {"name": "id", "type": "integer"} 547 {"name": "id", "type": "integer"}
544 ] 548 ]
545 }, 549 },
546 { 550 {
547 "name": "pause", 551 "name": "pause",
548 "type": "function", 552 "type": "function",
549 "description": "Pause the download.", 553 "description": "Pause the download.",
550 "parameters": [ 554 "parameters": [
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 "type": "string", 616 "type": "string",
613 "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." 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."
614 } 618 }
615 ] 619 ]
616 } 620 }
617 ] 621 ]
618 } 622 }
619 ] 623 ]
620 } 624 }
621 ] 625 ]
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/docs/experimental.html » ('j') | chrome/common/extensions/docs/themes.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698