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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 NETWORK_TIMEOUT, | 52 NETWORK_TIMEOUT, |
53 NETWORK_DISCONNECTED, | 53 NETWORK_DISCONNECTED, |
54 NETWORK_SERVER_DOWN, | 54 NETWORK_SERVER_DOWN, |
55 NETWORK_INVALID_REQUEST, | 55 NETWORK_INVALID_REQUEST, |
56 SERVER_FAILED, | 56 SERVER_FAILED, |
57 SERVER_NO_RANGE, | 57 SERVER_NO_RANGE, |
58 SERVER_BAD_CONTENT, | 58 SERVER_BAD_CONTENT, |
59 SERVER_UNAUTHORIZED, | 59 SERVER_UNAUTHORIZED, |
60 SERVER_CERT_PROBLEM, | 60 SERVER_CERT_PROBLEM, |
61 SERVER_FORBIDDEN, | 61 SERVER_FORBIDDEN, |
| 62 SERVER_UNREACHABLE, |
62 USER_CANCELED, | 63 USER_CANCELED, |
63 USER_SHUTDOWN, | 64 USER_SHUTDOWN, |
64 CRASH}; | 65 CRASH}; |
65 | 66 |
66 [inline_doc] dictionary DownloadOptions { | 67 [inline_doc] dictionary DownloadOptions { |
67 // The URL to download. | 68 // The URL to download. |
68 DOMString url; | 69 DOMString url; |
69 | 70 |
70 // A file path relative to the Downloads directory to contain the downloaded | 71 // A file path relative to the Downloads directory to contain the downloaded |
71 // file, possibly containing subdirectories. Absolute paths, empty paths, | 72 // file, possibly containing subdirectories. Absolute paths, empty paths, |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 // <code>suggestion</code> object to <code>suggest</code> wins. In order to | 543 // <code>suggestion</code> object to <code>suggest</code> wins. In order to |
543 // avoid confusion regarding which extension will win, users should not | 544 // avoid confusion regarding which extension will win, users should not |
544 // install extensions that may conflict. If the download is initiated by | 545 // install extensions that may conflict. If the download is initiated by |
545 // $(ref:download) and the target filename is known before the MIME type and | 546 // $(ref:download) and the target filename is known before the MIME type and |
546 // tentative filename have been determined, pass <code>filename</code> to | 547 // tentative filename have been determined, pass <code>filename</code> to |
547 // $(ref:download) instead. | 548 // $(ref:download) instead. |
548 [maxListeners=1] static void onDeterminingFilename( | 549 [maxListeners=1] static void onDeterminingFilename( |
549 DownloadItem downloadItem, SuggestFilenameCallback suggest); | 550 DownloadItem downloadItem, SuggestFilenameCallback suggest); |
550 }; | 551 }; |
551 }; | 552 }; |
OLD | NEW |