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

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

Issue 9617010: Move chrome.downloads out of experimental to dev (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: permissions Created 8 years, 9 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 // 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
3 // found in the LICENSE file.
4
5 [
6 {
7 "namespace": "downloads",
8 "properties": {
9 "ERROR_GENERIC": {
Aaron Boodman 2012/03/20 05:33:50 I realize what you're trying to do here, but I don
10 "type": "string",
11 "value": "I'm afraid I can't do that.",
12 "description": "Generic error."
13 },
14 "ERROR_INVALID_URL": {
15 "type": "string",
16 "value": "Invalid URL.",
17 "description": "The URL was invalid."
18 },
19 "ERROR_INVALID_OPERATION": {
20 "type": "string",
21 "value": "Invalid operation.",
22 "description": "The requested operation cannot be performed at this time . This maybe due to the download being in a state where the requested operation is not allowed."
23 }
24 },
25 "functions": [
26 {
27 "name": "download",
Aaron Boodman 2012/03/20 05:33:50 Shouldn't there be a change to download_extension_
28 "type": "function",
29 "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.",
Aaron Boodman 2012/03/20 05:33:50 I assume cookies are sent with download requests?
30 "parameters": [
31 {
32 "name": "options",
33 "type": "object",
34 "properties": {
35 "url": {
36 "type": "string",
37 "description": "The URL to download.",
38 "minLength": 1
39 },
40 "filename": {
41 "type": "string",
42 "description": "A file path relative to the Downloads directory to contain the downloaded file.",
43 "optional": true
44 },
45 "saveAs": {
46 "type": "boolean",
47 "optional": true,
48 "description": "Use a file-chooser to allow the user to select a filename."
49 },
50 "method": {
51 "type": "string",
52 "description": "The HTTP method to use if the URL uses the HTTP[ S] protocol.",
53 "optional": true,
54 "enum": ["GET", "POST"]
55 },
56 "headers": {
57 "optional": true,
58 "type": "array",
59 "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.",
60 "items": {
61 "type": "object",
62 "properties": {
63 "name": {"type": "string", "description": "Name of the HTTP header."},
64 "value": {
65 "type": "string",
66 "optional": true,
67 "description": "Value of the HTTP header if it can be repr esented by UTF-8."
68 },
69 "binaryValue": {
70 "type": "array",
71 "optional": true,
72 "description": "Value of the HTTP header if it cannot be r epresented by UTF-8, stored as individual byte values (0..255).",
73 "items": {"type": "integer"}
74 }
75 }
76 }
77 },
78 "body": {
79 "type": "string",
80 "description": "post body",
81 "optional": true
82 }
83 }
84 },
85 {
86 "name": "callback",
87 "type": "function",
88 "optional": true,
89 "parameters": [
90 {"name": "id", "type": "integer"}
91 ]
92 }
93 ]
94 }
95 ]
96 }
97 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698