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 // Use the <code>chrome.downloads</code> API to programmatically initiate, | 5 // Use the <code>chrome.downloads</code> API to programmatically initiate, |
6 // monitor, manipulate, and search for downloads. | 6 // monitor, manipulate, and search for downloads. |
7 [permissions=downloads] | 7 [permissions=downloads] |
8 namespace downloads { | 8 namespace downloads { |
9 [inline_doc] dictionary HeaderNameValuePair { | 9 [inline_doc] dictionary HeaderNameValuePair { |
10 // Name of the HTTP header. | 10 // Name of the HTTP header. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 NETWORK_DISCONNECTED, | 55 NETWORK_DISCONNECTED, |
56 NETWORK_SERVER_DOWN, | 56 NETWORK_SERVER_DOWN, |
57 NETWORK_INVALID_REQUEST, | 57 NETWORK_INVALID_REQUEST, |
58 SERVER_FAILED, | 58 SERVER_FAILED, |
59 SERVER_NO_RANGE, | 59 SERVER_NO_RANGE, |
60 SERVER_BAD_CONTENT, | 60 SERVER_BAD_CONTENT, |
61 SERVER_UNAUTHORIZED, | 61 SERVER_UNAUTHORIZED, |
62 SERVER_CERT_PROBLEM, | 62 SERVER_CERT_PROBLEM, |
63 SERVER_FORBIDDEN, | 63 SERVER_FORBIDDEN, |
64 SERVER_UNREACHABLE, | 64 SERVER_UNREACHABLE, |
| 65 SERVER_CONTENT_LENGTH_MISMATCH, |
65 USER_CANCELED, | 66 USER_CANCELED, |
66 USER_SHUTDOWN, | 67 USER_SHUTDOWN, |
67 CRASH}; | 68 CRASH}; |
68 | 69 |
69 [inline_doc] dictionary DownloadOptions { | 70 [inline_doc] dictionary DownloadOptions { |
70 // The URL to download. | 71 // The URL to download. |
71 DOMString url; | 72 DOMString url; |
72 | 73 |
73 // A file path relative to the Downloads directory to contain the downloaded | 74 // A file path relative to the Downloads directory to contain the downloaded |
74 // file, possibly containing subdirectories. Absolute paths, empty paths, | 75 // file, possibly containing subdirectories. Absolute paths, empty paths, |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 // <code>suggestion</code> object to <code>suggest</code> wins. In order to | 563 // <code>suggestion</code> object to <code>suggest</code> wins. In order to |
563 // avoid confusion regarding which extension will win, users should not | 564 // avoid confusion regarding which extension will win, users should not |
564 // install extensions that may conflict. If the download is initiated by | 565 // install extensions that may conflict. If the download is initiated by |
565 // $(ref:download) and the target filename is known before the MIME type and | 566 // $(ref:download) and the target filename is known before the MIME type and |
566 // tentative filename have been determined, pass <code>filename</code> to | 567 // tentative filename have been determined, pass <code>filename</code> to |
567 // $(ref:download) instead. | 568 // $(ref:download) instead. |
568 [maxListeners=1] static void onDeterminingFilename( | 569 [maxListeners=1] static void onDeterminingFilename( |
569 DownloadItem downloadItem, SuggestFilenameCallback suggest); | 570 DownloadItem downloadItem, SuggestFilenameCallback suggest); |
570 }; | 571 }; |
571 }; | 572 }; |
OLD | NEW |