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

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

Issue 10639020: Switch the downloads API over to IDL/json_schema_compiler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 5 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
(Empty)
1 [
2 {
3 "documentation_permissions_required": [
4 "downloads"
5 ],
6 "events": [
7 {
8 "description": "This event fires with the <a href='#type-DownloadItem'>D ownloadItem</a> object when a download begins.",
9 "name": "onCreated",
10 "parameters": [
11 {
12 "$ref": "DownloadItem",
13 "name": "downloadItem"
14 }
15 ],
16 "type": "function"
17 },
18 {
19 "description": "Fires with the <code>downloadId</code> when a download i s erased from history.",
20 "name": "onErased",
21 "parameters": [
22 {
23 "name": "downloadId",
24 "description": "The <code>id</code> of the <a href='#type-DownloadIt em'>DownloadItem</a> that was erased.",
25 "type": "integer"
26 }
27 ],
28 "type": "function"
29 },
30 {
31 "description": "When any of a <a href='#type-DownloadItem'>DownloadItem< /a>'s properties except <code>bytesReceived</code> changes, this event fires wit h the <code>downloadId</code> and an object containing the properties that chang ed.",
32 "name": "onChanged",
33 "parameters": [
34 {
35 "name": "downloadDelta",
36 "properties": {
37 "danger": {
38 "description": "Describes a change in a <a href='#type-DownloadI tem'>DownloadItem</a>'s <code>danger</code>.",
39 "optional": true,
40 "properties": {
41 "current": {
42 "optional": true,
43 "type": "string"
44 },
45 "previous": {
46 "optional": true,
47 "type": "string"
48 }
49 },
50 "type": "object"
51 },
52 "dangerAccepted": {
53 "description": "Describes a change in a <a href='#type-DownloadI tem'>DownloadItem</a>'s <code>dangerAccepted</code>.",
54 "optional": true,
55 "properties": {
56 "current": {
57 "optional": true,
58 "type": "boolean"
59 },
60 "previous": {
61 "optional": true,
62 "type": "boolean"
63 }
64 },
65 "type": "object"
66 },
67 "endTime": {
68 "description": "Describes a change in a <a href='#type-DownloadI tem'>DownloadItem</a>'s <code>endTime</code>.",
69 "optional": true,
70 "properties": {
71 "current": {
72 "optional": true,
73 "type": "integer"
74 },
75 "previous": {
76 "optional": true,
77 "type": "integer"
78 }
79 },
80 "type": "object"
81 },
82 "error": {
83 "description": "Describes a change in a <a href='#type-DownloadI tem'>DownloadItem</a>'s <code>error</code>.",
84 "optional": true,
85 "properties": {
86 "current": {
87 "optional": true,
88 "type": "integer"
89 },
90 "previous": {
91 "optional": true,
92 "type": "integer"
93 }
94 },
95 "type": "object"
96 },
97 "fileSize": {
98 "description": "Describes a change in a <a href='#type-DownloadI tem'>DownloadItem</a>'s <code>fileSize</code>.",
99 "optional": true,
100 "properties": {
101 "current": {
102 "optional": true,
103 "type": "integer"
104 },
105 "previous": {
106 "optional": true,
107 "type": "integer"
108 }
109 },
110 "type": "object"
111 },
112 "filename": {
113 "description": "Describes a change in a <a href='#type-DownloadI tem'>DownloadItem</a>'s <code>filename</code>.",
114 "optional": true,
115 "properties": {
116 "current": {
117 "optional": true,
118 "type": "string"
119 },
120 "previous": {
121 "optional": true,
122 "type": "string"
123 }
124 },
125 "type": "object"
126 },
127 "id": {
128 "description": "The <code>id</code> of the <a href='#type-Downlo adItem'>DownloadItem</a> that changed.",
129 "type": "integer"
130 },
131 "mime": {
132 "description": "Describes a change in a <a href='#type-DownloadI tem'>DownloadItem</a>'s <code>mime</code>.",
133 "optional": true,
134 "properties": {
135 "current": {
136 "optional": true,
137 "type": "string"
138 },
139 "previous": {
140 "optional": true,
141 "type": "string"
142 }
143 },
144 "type": "object"
145 },
146 "paused": {
147 "description": "Describes a change in a <a href='#type-DownloadI tem'>DownloadItem</a>'s <code>paused</code>.",
148 "optional": true,
149 "properties": {
150 "current": {
151 "optional": true,
152 "type": "boolean"
153 },
154 "previous": {
155 "optional": true,
156 "type": "boolean"
157 }
158 },
159 "type": "object"
160 },
161 "startTime": {
162 "description": "Describes a change in a <a href='#type-DownloadI tem'>DownloadItem</a>'s <code>startTime</code>.",
163 "optional": true,
164 "properties": {
165 "current": {
166 "optional": true,
167 "type": "integer"
168 },
169 "previous": {
170 "optional": true,
171 "type": "integer"
172 }
173 },
174 "type": "object"
175 },
176 "state": {
177 "description": "Describes a change in a <a href='#type-DownloadI tem'>DownloadItem</a>'s <code>state</code>.",
178 "optional": true,
179 "properties": {
180 "current": {
181 "optional": true,
182 "type": "string"
183 },
184 "previous": {
185 "optional": true,
186 "type": "string"
187 }
188 },
189 "type": "object"
190 },
191 "totalBytes": {
192 "description": "Describes a change in a <a href='#type-DownloadI tem'>DownloadItem</a>'s <code>totalBytes</code>.",
193 "optional": true,
194 "properties": {
195 "current": {
196 "optional": true,
197 "type": "integer"
198 },
199 "previous": {
200 "optional": true,
201 "type": "integer"
202 }
203 },
204 "type": "object"
205 },
206 "url": {
207 "description": "Describes a change in a <a href='#type-DownloadI tem'>DownloadItem</a>'s <code>url</code>.",
208 "optional": true,
209 "properties": {
210 "current": {
211 "optional": true,
212 "type": "string"
213 },
214 "previous": {
215 "optional": true,
216 "type": "string"
217 }
218 },
219 "type": "object"
220 }
221 },
222 "type": "object"
223 }
224 ],
225 "type": "function"
226 }
227 ],
228 "functions": [
229 {
230 "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 both <code>filename</code> and <code>saveAs</code> are specified, then the Save As di alog will be displayed, pre-populated with the specified <code>filename</code>. If the download started successfully, <code>callback</code> will be called with the new <a href='#type-DownloadItem'>DownloadItem</a>'s <code>downloadId</code>. If there was an error starting the download, then <code>callback</code> will be called with <code>downloadId=undefined</code> and <a href='extension.html#prope rty-lastError'>chrome.extension.lastError</a> will contain a descriptive string. The error strings are not guaranteed to remain backwards compatible between rel eases. You must not parse it.",
231 "name": "download",
232 "parameters": [
233 {
234 "description": "What to download and how.",
235 "name": "options",
236 "properties": {
237 "body": {
238 "description": "Post body.",
239 "optional": true,
240 "type": "string"
241 },
242 "filename": {
243 "description": "A file path relative to the Downloads directory to contain the downloaded file.",
244 "optional": true,
245 "type": "string"
246 },
247 "headers": {
248 "description": "Extra HTTP headers to send with the request if t he URL uses the HTTP[s] protocol. Each header is represented as a dictionary con taining the keys <code>name</code> and either <code>value</code> or <code>binary Value</code>, restricted to those allowed by XMLHttpRequest.",
249 "items": {
250 "properties": {
251 "name": {
252 "description": "Name of the HTTP header.",
253 "type": "string"
254 },
255 "value": {
256 "description": "Value of the HTTP header.",
257 "type": "string"
258 }
259 },
260 "type": "object"
261 },
262 "optional": true,
263 "type": "array"
264 },
265 "method": {
266 "description": "The HTTP method to use if the URL uses the HTTP[ S] protocol.",
267 "enum": [
268 "GET",
269 "POST"
270 ],
271 "optional": true,
272 "type": "string"
273 },
274 "saveAs": {
275 "description": "Use a file-chooser to allow the user to select a filename.",
276 "optional": true,
277 "type": "boolean"
278 },
279 "url": {
280 "description": "The URL to download.",
281 "type": "string"
282 }
283 },
284 "type": "object"
285 },
286 {
287 "name": "DownloadCallback",
288 "optional": true,
289 "parameters": [
290 {
291 "name": "downloadId",
292 "type": "integer"
293 }
294 ],
295 "type": "function"
296 }
297 ],
298 "type": "function"
299 },
300 {
301 "description": "Find <a href='#type-DownloadItem'>DownloadItems</a>. Set <code>query</code> to the empty object to get all <a href='#type-DownloadItem'> DownloadItems</a>. To get a specific <a href='#type-DownloadItem'>DownloadItem</ a>, set only the <code>id</code> field.",
302 "name": "search",
303 "parameters": [
304 {
305 "name": "query",
306 "properties": {
307 "bytesReceived": {
308 "description": "Number of bytes received so far from the host, w ithout considering file compression.",
309 "optional": true,
310 "type": "integer"
311 },
312 "danger": {
313 "$ref": "DangerType",
314 "description": "Indication of whether this download is thought t o be safe or known to be suspicious.",
315 "optional": true
316 },
317 "dangerAccepted": {
318 "description": "True if the user has accepted the download's dan ger.",
319 "optional": true,
320 "type": "boolean"
321 },
322 "endTime": {
323 "description": "Number of milliseconds between the unix epoch an d when this download ended.",
324 "optional": true,
325 "type": "integer"
326 },
327 "endedAfter": {
328 "description": "Limits results to downloads that ended after the given ms since the epoch.",
329 "optional": true,
330 "type": "integer"
331 },
332 "endedBefore": {
333 "description": "Limits results to downloads that ended before th e given ms since the epoch.",
334 "optional": true,
335 "type": "integer"
336 },
337 "error": {
338 "description": "Number indicating why a download was interrupted .",
339 "optional": true,
340 "type": "integer"
341 },
342 "fileSize": {
343 "description": "Number of bytes in the whole file post-decompres sion, or -1 if unknown.",
344 "optional": true,
345 "type": "integer"
346 },
347 "filename": {
348 "description": "Absolute local path.",
349 "optional": true,
350 "type": "string"
351 },
352 "filenameRegex": {
353 "description": "Limits results to <a href='#type-DownloadItem'>D ownloadItems</a> whose <code>filename</code> matches the given regular expressio n.",
354 "optional": true,
355 "type": "string"
356 },
357 "id": {
358 "description": "An identifier that is persistent across browser sessions.",
359 "optional": true,
360 "type": "integer"
361 },
362 "limit": {
363 "description": "Setting this integer limits the number of result s. Otherwise, all matching <a href='#type-DownloadItem'>DownloadItems</a> will b e returned.",
364 "optional": true,
365 "type": "integer"
366 },
367 "mime": {
368 "description": "The file's MIME type.",
369 "optional": true,
370 "type": "string"
371 },
372 "orderBy": {
373 "description": "Setting this string to a <a href='#type-Download Item'>DownloadItem</a> property sorts the <a href='#type-DownloadItem'>DownloadI tems</a> prior to applying the above filters. For example, setting <code>orderBy ='startTime'</code> sorts the <a href='#type-DownloadItem'>DownloadItems</a> by their start time in ascending order. To specify descending order, prefix <code>o rderBy</code> with a hyphen: '-startTime'.",
374 "optional": true,
375 "type": "string"
376 },
377 "paused": {
378 "description": "True if the download has stopped reading data fr om the host, but kept the connection open.",
379 "optional": true,
380 "type": "boolean"
381 },
382 "query": {
383 "description": "This space-separated string of search terms that may be grouped using quotation marks limits results to <a href='#type-DownloadI tem'>DownloadItems</a> whose <code>filename</code> or <code>url</code> contain a ll of the search terms that do not begin with a dash '-' and none of the search terms that do begin with a dash.",
384 "optional": true,
385 "type": "string"
386 },
387 "startTime": {
388 "description": "Number of milliseconds between the unix epoch an d when this download began.",
389 "optional": true,
390 "type": "integer"
391 },
392 "startedAfter": {
393 "description": "Limits results to downloads that started after t he given ms since the epoch.",
394 "optional": true,
395 "type": "integer"
396 },
397 "startedBefore": {
398 "description": "Limits results to downloads that started before the given ms since the epoch.",
399 "optional": true,
400 "type": "integer"
401 },
402 "state": {
403 "$ref": "State",
404 "description": "Indicates whether the download is progressing, i nterrupted, or complete.",
405 "optional": true
406 },
407 "totalBytes": {
408 "description": "Number of bytes in the whole file, without consi dering file compression, or -1 if unknown.",
409 "optional": true,
410 "type": "integer"
411 },
412 "totalBytesGreater": {
413 "description": "Limits results to downloads whose totalBytes is greater than the given integer.",
414 "optional": true,
415 "type": "integer"
416 },
417 "totalBytesLess": {
418 "description": "Limits results to downloads whose totalBytes is less than the given integer.",
419 "optional": true,
420 "type": "integer"
421 },
422 "url": {
423 "description": "Absolute URL.",
424 "optional": true,
425 "type": "string"
426 },
427 "urlRegex": {
428 "description": "Limits results to <a href='#type-DownloadItem'>D ownloadItems</a> whose <code>url</code> matches the given regular expression.",
429 "optional": true,
430 "type": "string"
431 }
432 },
433 "type": "object"
434 },
435 {
436 "name": "SearchCallback",
437 "parameters": [
438 {
439 "items": {
440 "$ref": "DownloadItem"
441 },
442 "name": "results",
443 "type": "array"
444 }
445 ],
446 "type": "function"
447 }
448 ],
449 "type": "function"
450 },
451 {
452 "description": "Pause the download. If the request was successful the do wnload is in a paused state. Otherwise <a href='extension.html#property-lastErro r'>chrome.extension.lastError</a> contains an error message. The request will fa il if the download is not active.",
453 "name": "pause",
454 "parameters": [
455 {
456 "description": "The id of the download to pause.",
457 "name": "downloadId",
458 "type": "integer"
459 },
460 {
461 "name": "NullCallback",
462 "optional": true,
463 "parameters": [],
464 "type": "function"
465 }
466 ],
467 "type": "function"
468 },
469 {
470 "description": "Resume a paused download. If the request was successful the download is in progress and unpaused. Otherwise <a href='extension.html#prop erty-lastError'>chrome.extension.lastError</a> contains an error message. The re quest will fail if the download is not active.",
471 "name": "resume",
472 "parameters": [
473 {
474 "description": "The id of the download to resume.",
475 "name": "downloadId",
476 "type": "integer"
477 },
478 {
479 "name": "NullCallback",
480 "optional": true,
481 "parameters": [],
482 "type": "function"
483 }
484 ],
485 "type": "function"
486 },
487 {
488 "description": "Cancel a download. When <code>callback</code> is run, th e download is cancelled, completed, interrupted or doesn't exist anymore.",
489 "name": "cancel",
490 "parameters": [
491 {
492 "description": "The id of the download to cancel.",
493 "name": "downloadId",
494 "type": "integer"
495 },
496 {
497 "name": "NullCallback",
498 "optional": true,
499 "parameters": [],
500 "type": "function"
501 }
502 ],
503 "type": "function"
504 },
505 {
506 "description": "Retrieve an icon for the specified download. For new dow nloads, file icons are available after the <a href='#event-onCreated'>onCreated< /a> event has been received. The image returned by this function while a downloa d is in progress may be different from the image returned after the download is complete. Icon retrieval is done by querying the underlying operating system or toolkit depending on the platform. The icon that is returned will therefore depe nd on a number of factors including state of the download, platform, registered file types and visual theme. If a file icon cannot be determined, <a href='exten sion.html#property-lastError'>chrome.extension.lastError</a> will contain an err or message.",
507 "name": "getFileIcon",
508 "parameters": [
509 {
510 "description": "The identifier for the download.",
511 "name": "downloadId",
512 "type": "integer"
513 },
514 {
515 "name": "options",
516 "optional": true,
517 "properties": {
518 "size": {
519 "description": "The size of the icon. The returned icon will be square with dimensions size * size pixels. The default size for the icon is 32 x32 pixels.",
520 "enum": [
521 16,
522 32
523 ],
524 "optional": true,
525 "type": "integer"
526 }
527 },
528 "type": "object"
529 },
530 {
531 "name": "GetFileIconCallback",
532 "parameters": [
533 {
534 "name": "iconURL",
535 "optional": true,
536 "type": "string"
537 }
538 ],
539 "type": "function"
540 }
541 ],
542 "type": "function"
543 },
544 {
545 "description": "Erase matching <a href='#type-DownloadItem'>DownloadItem s</a> from history",
546 "name": "erase",
547 "nodoc": true,
548 "parameters": [
549 {
550 "$ref": "DownloadQuery",
551 "name": "query"
552 },
553 {
554 "name": "EraseCallback",
555 "optional": true,
556 "parameters": [
557 {
558 "items": {
559 "type": "integer"
560 },
561 "name": "erasedIds",
562 "type": "array"
563 }
564 ],
565 "type": "function"
566 }
567 ],
568 "type": "function"
569 },
570 {
571 "description": "TODO(benjhayden) Comment.",
572 "name": "setDestination",
573 "nodoc": true,
574 "parameters": [
575 {
576 "name": "downloadId",
577 "type": "integer"
578 },
579 {
580 "name": "relativePath",
581 "type": "string"
582 }
583 ],
584 "type": "function"
585 },
586 {
587 "description": "Prompt the user to either accept or cancel a dangerous d ownload. <code>acceptDanger()</code> does not automatically accept dangerous dow nloads.",
588 "name": "acceptDanger",
589 "nodoc": true,
590 "parameters": [
591 {
592 "name": "downloadId",
593 "type": "integer"
594 }
595 ],
596 "type": "function"
597 },
598 {
599 "description": "Show the downloaded file in its folder in a file manager .",
600 "name": "show",
601 "nodoc": true,
602 "parameters": [
603 {
604 "name": "downloadId",
605 "type": "integer"
606 }
607 ],
608 "type": "function"
609 },
610 {
611 "description": "Open the downloaded file.",
612 "name": "open",
613 "nodoc": true,
614 "parameters": [
615 {
616 "name": "downloadId",
617 "type": "integer"
618 }
619 ],
620 "type": "function"
621 },
622 {
623 "description": "Initiate dragging the file to another application.",
624 "name": "drag",
625 "nodoc": true,
626 "parameters": [
627 {
628 "name": "downloadId",
629 "type": "integer"
630 }
631 ],
632 "type": "function"
633 }
634 ],
635 "namespace": "downloads",
636 "nodoc": false,
637 "types": [
638 {
639 "id": "HeaderNameValuePair",
640 "nodoc": true,
641 "properties": {
642 "name": {
643 "description": "Name of the HTTP header.",
644 "type": "string"
645 },
646 "value": {
647 "description": "Value of the HTTP header.",
648 "type": "string"
649 }
650 },
651 "type": "object"
652 },
653 {
654 "description": "",
655 "enum": [
656 "GET",
657 "POST"
658 ],
659 "id": "HttpMethod",
660 "nodoc": true,
661 "type": "string"
662 },
663 {
664 "id": "DownloadOptions",
665 "nodoc": true,
666 "properties": {
667 "body": {
668 "description": "Post body.",
669 "optional": true,
670 "type": "string"
671 },
672 "filename": {
673 "description": "A file path relative to the Downloads directory to c ontain the downloaded file.",
674 "optional": true,
675 "type": "string"
676 },
677 "headers": {
678 "description": "Extra HTTP headers to send with the request if the U RL uses the HTTP[s] protocol. Each header is represented as a dictionary contain ing the keys <code>name</code> and either <code>value</code> or <code>binaryValu e</code>, restricted to those allowed by XMLHttpRequest.",
679 "items": {
680 "properties": {
681 "name": {
682 "description": "Name of the HTTP header.",
683 "type": "string"
684 },
685 "value": {
686 "description": "Value of the HTTP header.",
687 "type": "string"
688 }
689 },
690 "type": "object"
691 },
692 "optional": true,
693 "type": "array"
694 },
695 "method": {
696 "description": "The HTTP method to use if the URL uses the HTTP[S] p rotocol.",
697 "enum": [
698 "GET",
699 "POST"
700 ],
701 "optional": true,
702 "type": "string"
703 },
704 "saveAs": {
705 "description": "Use a file-chooser to allow the user to select a fil ename.",
706 "optional": true,
707 "type": "boolean"
708 },
709 "url": {
710 "description": "The URL to download.",
711 "type": "string"
712 }
713 },
714 "type": "object"
715 },
716 {
717 "description": "<dl><dt>file</dt><dd>The download's filename is suspicio us.</dd><dt>url</dt><dd>The download's URL is known to be malicious.</dd><dt>con tent</dt><dd>The downloaded file is known to be malicious.</dd><dt>uncommon</dt> <dd>The download's URL is not commonly downloaded and could be dangerous.</dd><d t>safe</dt><dd>The download presents no known danger to the user's computer.</dd ></dl>These string constants will never change, however the set of DangerTypes m ay change.",
718 "enum": [
719 "file",
720 "url",
721 "content",
722 "uncommon",
723 "safe"
724 ],
725 "id": "DangerType",
726 "type": "string"
727 },
728 {
729 "description": "<dl><dt>in_progress</dt><dd>The download is currently re ceiving data from the server.</dd><dt>interrupted</dt><dd>An error broke the con nection with the file host.</dd><dt>complete</dt><dd>The download completed succ essfully.</dd></dl>These string constants will never change, however the set of States may change.",
730 "enum": [
731 "in_progress",
732 "interrupted",
733 "complete"
734 ],
735 "id": "State",
736 "type": "string"
737 },
738 {
739 "id": "DownloadItem",
740 "properties": {
741 "bytesReceived": {
742 "description": "Number of bytes received so far from the host, witho ut considering file compression.",
743 "name": "bytesReceived",
744 "type": "integer"
745 },
746 "danger": {
747 "$ref": "DangerType",
748 "description": "Indication of whether this download is thought to be safe or known to be suspicious.",
749 "name": "danger"
750 },
751 "dangerAccepted": {
752 "description": "True if the user has accepted the download's danger. ",
753 "name": "dangerAccepted",
754 "optional": true,
755 "type": "boolean"
756 },
757 "endTime": {
758 "description": "Number of milliseconds between the unix epoch and wh en this download ended.",
759 "name": "endTime",
760 "optional": true,
761 "type": "integer"
762 },
763 "error": {
764 "description": "Number indicating why a download was interrupted.",
765 "name": "error",
766 "optional": true,
767 "type": "integer"
768 },
769 "fileSize": {
770 "description": "Number of bytes in the whole file post-decompression , or -1 if unknown.",
771 "name": "fileSize",
772 "type": "integer"
773 },
774 "filename": {
775 "description": "Absolute local path.",
776 "name": "filename",
777 "type": "string"
778 },
779 "id": {
780 "description": "An identifier that is persistent across browser sess ions.",
781 "name": "id",
782 "type": "integer"
783 },
784 "incognito": {
785 "description": "False if this download is recorded in the history, t rue if it is not recorded.",
786 "name": "incognito",
787 "type": "boolean"
788 },
789 "mime": {
790 "description": "The file's MIME type.",
791 "name": "mime",
792 "type": "string"
793 },
794 "paused": {
795 "description": "True if the download has stopped reading data from t he host, but kept the connection open.",
796 "name": "paused",
797 "type": "boolean"
798 },
799 "startTime": {
800 "description": "Number of milliseconds between the unix epoch and wh en this download began.",
801 "name": "startTime",
802 "type": "integer"
803 },
804 "state": {
805 "$ref": "State",
806 "description": "Indicates whether the download is progressing, inter rupted, or complete.",
807 "name": "state"
808 },
809 "totalBytes": {
810 "description": "Number of bytes in the whole file, without consideri ng file compression, or -1 if unknown.",
811 "name": "totalBytes",
812 "type": "integer"
813 },
814 "url": {
815 "description": "Absolute URL.",
816 "name": "url",
817 "type": "string"
818 }
819 },
820 "type": "object"
821 },
822 {
823 "id": "DownloadQuery",
824 "nodoc": true,
825 "properties": {
826 "bytesReceived": {
827 "description": "Number of bytes received so far from the host, witho ut considering file compression.",
828 "optional": true,
829 "type": "integer"
830 },
831 "danger": {
832 "$ref": "DangerType",
833 "description": "Indication of whether this download is thought to be safe or known to be suspicious.",
834 "optional": true
835 },
836 "dangerAccepted": {
837 "description": "True if the user has accepted the download's danger. ",
838 "optional": true,
839 "type": "boolean"
840 },
841 "endTime": {
842 "description": "Number of milliseconds between the unix epoch and wh en this download ended.",
843 "optional": true,
844 "type": "integer"
845 },
846 "endedAfter": {
847 "description": "Limits results to downloads that ended after the giv en ms since the epoch.",
848 "optional": true,
849 "type": "integer"
850 },
851 "endedBefore": {
852 "description": "Limits results to downloads that ended before the gi ven ms since the epoch.",
853 "optional": true,
854 "type": "integer"
855 },
856 "error": {
857 "description": "Number indicating why a download was interrupted.",
858 "optional": true,
859 "type": "integer"
860 },
861 "fileSize": {
862 "description": "Number of bytes in the whole file post-decompression , or -1 if unknown.",
863 "optional": true,
864 "type": "integer"
865 },
866 "filename": {
867 "description": "Absolute local path.",
868 "optional": true,
869 "type": "string"
870 },
871 "filenameRegex": {
872 "description": "Limits results to <a href='#type-DownloadItem'>Downl oadItems</a> whose <code>filename</code> matches the given regular expression.",
873 "optional": true,
874 "type": "string"
875 },
876 "id": {
877 "description": "An identifier that is persistent across browser sess ions.",
878 "optional": true,
879 "type": "integer"
880 },
881 "limit": {
882 "description": "Setting this integer limits the number of results. O therwise, all matching <a href='#type-DownloadItem'>DownloadItems</a> will be re turned.",
883 "optional": true,
884 "type": "integer"
885 },
886 "mime": {
887 "description": "The file's MIME type.",
888 "optional": true,
889 "type": "string"
890 },
891 "orderBy": {
892 "description": "Setting this string to a <a href='#type-DownloadItem '>DownloadItem</a> property sorts the <a href='#type-DownloadItem'>DownloadItems </a> prior to applying the above filters. For example, setting <code>orderBy='st artTime'</code> sorts the <a href='#type-DownloadItem'>DownloadItems</a> by thei r start time in ascending order. To specify descending order, prefix <code>order By</code> with a hyphen: '-startTime'.",
893 "optional": true,
894 "type": "string"
895 },
896 "paused": {
897 "description": "True if the download has stopped reading data from t he host, but kept the connection open.",
898 "optional": true,
899 "type": "boolean"
900 },
901 "query": {
902 "description": "This space-separated string of search terms that may be grouped using quotation marks limits results to <a href='#type-DownloadItem' >DownloadItems</a> whose <code>filename</code> or <code>url</code> contain all o f the search terms that do not begin with a dash '-' and none of the search term s that do begin with a dash.",
903 "optional": true,
904 "type": "string"
905 },
906 "startTime": {
907 "description": "Number of milliseconds between the unix epoch and wh en this download began.",
908 "optional": true,
909 "type": "integer"
910 },
911 "startedAfter": {
912 "description": "Limits results to downloads that started after the g iven ms since the epoch.",
913 "optional": true,
914 "type": "integer"
915 },
916 "startedBefore": {
917 "description": "Limits results to downloads that started before the given ms since the epoch.",
918 "optional": true,
919 "type": "integer"
920 },
921 "state": {
922 "$ref": "State",
923 "description": "Indicates whether the download is progressing, inter rupted, or complete.",
924 "optional": true
925 },
926 "totalBytes": {
927 "description": "Number of bytes in the whole file, without consideri ng file compression, or -1 if unknown.",
928 "optional": true,
929 "type": "integer"
930 },
931 "totalBytesGreater": {
932 "description": "Limits results to downloads whose totalBytes is grea ter than the given integer.",
933 "optional": true,
934 "type": "integer"
935 },
936 "totalBytesLess": {
937 "description": "Limits results to downloads whose totalBytes is less than the given integer.",
938 "optional": true,
939 "type": "integer"
940 },
941 "url": {
942 "description": "Absolute URL.",
943 "optional": true,
944 "type": "string"
945 },
946 "urlRegex": {
947 "description": "Limits results to <a href='#type-DownloadItem'>Downl oadItems</a> whose <code>url</code> matches the given regular expression.",
948 "optional": true,
949 "type": "string"
950 }
951 },
952 "type": "object"
953 },
954 {
955 "id": "DownloadStringDiff",
956 "nodoc": true,
957 "properties": {
958 "current": {
959 "optional": true,
960 "type": "string"
961 },
962 "previous": {
963 "optional": true,
964 "type": "string"
965 }
966 },
967 "type": "object"
968 },
969 {
970 "id": "DownloadLongDiff",
971 "nodoc": true,
972 "properties": {
973 "current": {
974 "optional": true,
975 "type": "integer"
976 },
977 "previous": {
978 "optional": true,
979 "type": "integer"
980 }
981 },
982 "type": "object"
983 },
984 {
985 "id": "DownloadBooleanDiff",
986 "nodoc": true,
987 "properties": {
988 "current": {
989 "optional": true,
990 "type": "boolean"
991 },
992 "previous": {
993 "optional": true,
994 "type": "boolean"
995 }
996 },
997 "type": "object"
998 },
999 {
1000 "id": "DownloadDelta",
1001 "nodoc": true,
1002 "properties": {
1003 "danger": {
1004 "description": "Describes a change in a <a href='#type-DownloadItem' >DownloadItem</a>'s <code>danger</code>.",
1005 "optional": true,
1006 "properties": {
1007 "current": {
1008 "optional": true,
1009 "type": "string"
1010 },
1011 "previous": {
1012 "optional": true,
1013 "type": "string"
1014 }
1015 },
1016 "type": "object"
1017 },
1018 "dangerAccepted": {
1019 "description": "Describes a change in a <a href='#type-DownloadItem' >DownloadItem</a>'s <code>dangerAccepted</code>.",
1020 "optional": true,
1021 "properties": {
1022 "current": {
1023 "optional": true,
1024 "type": "boolean"
1025 },
1026 "previous": {
1027 "optional": true,
1028 "type": "boolean"
1029 }
1030 },
1031 "type": "object"
1032 },
1033 "endTime": {
1034 "description": "Describes a change in a <a href='#type-DownloadItem' >DownloadItem</a>'s <code>endTime</code>.",
1035 "optional": true,
1036 "properties": {
1037 "current": {
1038 "optional": true,
1039 "type": "integer"
1040 },
1041 "previous": {
1042 "optional": true,
1043 "type": "integer"
1044 }
1045 },
1046 "type": "object"
1047 },
1048 "error": {
1049 "description": "Describes a change in a <a href='#type-DownloadItem' >DownloadItem</a>'s <code>error</code>.",
1050 "optional": true,
1051 "properties": {
1052 "current": {
1053 "optional": true,
1054 "type": "integer"
1055 },
1056 "previous": {
1057 "optional": true,
1058 "type": "integer"
1059 }
1060 },
1061 "type": "object"
1062 },
1063 "fileSize": {
1064 "description": "Describes a change in a <a href='#type-DownloadItem' >DownloadItem</a>'s <code>fileSize</code>.",
1065 "optional": true,
1066 "properties": {
1067 "current": {
1068 "optional": true,
1069 "type": "integer"
1070 },
1071 "previous": {
1072 "optional": true,
1073 "type": "integer"
1074 }
1075 },
1076 "type": "object"
1077 },
1078 "filename": {
1079 "description": "Describes a change in a <a href='#type-DownloadItem' >DownloadItem</a>'s <code>filename</code>.",
1080 "optional": true,
1081 "properties": {
1082 "current": {
1083 "optional": true,
1084 "type": "string"
1085 },
1086 "previous": {
1087 "optional": true,
1088 "type": "string"
1089 }
1090 },
1091 "type": "object"
1092 },
1093 "id": {
1094 "description": "The <code>id</code> of the <a href='#type-DownloadIt em'>DownloadItem</a> that changed.",
1095 "type": "integer"
1096 },
1097 "mime": {
1098 "description": "Describes a change in a <a href='#type-DownloadItem' >DownloadItem</a>'s <code>mime</code>.",
1099 "optional": true,
1100 "properties": {
1101 "current": {
1102 "optional": true,
1103 "type": "string"
1104 },
1105 "previous": {
1106 "optional": true,
1107 "type": "string"
1108 }
1109 },
1110 "type": "object"
1111 },
1112 "paused": {
1113 "description": "Describes a change in a <a href='#type-DownloadItem' >DownloadItem</a>'s <code>paused</code>.",
1114 "optional": true,
1115 "properties": {
1116 "current": {
1117 "optional": true,
1118 "type": "boolean"
1119 },
1120 "previous": {
1121 "optional": true,
1122 "type": "boolean"
1123 }
1124 },
1125 "type": "object"
1126 },
1127 "startTime": {
1128 "description": "Describes a change in a <a href='#type-DownloadItem' >DownloadItem</a>'s <code>startTime</code>.",
1129 "optional": true,
1130 "properties": {
1131 "current": {
1132 "optional": true,
1133 "type": "integer"
1134 },
1135 "previous": {
1136 "optional": true,
1137 "type": "integer"
1138 }
1139 },
1140 "type": "object"
1141 },
1142 "state": {
1143 "description": "Describes a change in a <a href='#type-DownloadItem' >DownloadItem</a>'s <code>state</code>.",
1144 "optional": true,
1145 "properties": {
1146 "current": {
1147 "optional": true,
1148 "type": "string"
1149 },
1150 "previous": {
1151 "optional": true,
1152 "type": "string"
1153 }
1154 },
1155 "type": "object"
1156 },
1157 "totalBytes": {
1158 "description": "Describes a change in a <a href='#type-DownloadItem' >DownloadItem</a>'s <code>totalBytes</code>.",
1159 "optional": true,
1160 "properties": {
1161 "current": {
1162 "optional": true,
1163 "type": "integer"
1164 },
1165 "previous": {
1166 "optional": true,
1167 "type": "integer"
1168 }
1169 },
1170 "type": "object"
1171 },
1172 "url": {
1173 "description": "Describes a change in a <a href='#type-DownloadItem' >DownloadItem</a>'s <code>url</code>.",
1174 "optional": true,
1175 "properties": {
1176 "current": {
1177 "optional": true,
1178 "type": "string"
1179 },
1180 "previous": {
1181 "optional": true,
1182 "type": "string"
1183 }
1184 },
1185 "type": "object"
1186 }
1187 },
1188 "type": "object"
1189 },
1190 {
1191 "id": "GetFileIconOptions",
1192 "nodoc": true,
1193 "properties": {
1194 "size": {
1195 "description": "The size of the icon. The returned icon will be squ are with dimensions size * size pixels. The default size for the icon is 32x32 pixels.",
1196 "enum": [
1197 16,
1198 32
1199 ],
1200 "optional": true,
1201 "type": "integer"
1202 }
1203 },
1204 "type": "object"
1205 }
1206 ]
1207 }
1208 ]
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/downloads.idl ('k') | chrome/common/extensions/api/extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698