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

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

Issue 7480046: chrome.experimental.downloads stubs (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: " Created 9 years, 4 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": "extension", 3 "namespace": "extension",
4 "unprivileged": true, 4 "unprivileged": true,
5 "types": [ 5 "types": [
6 { 6 {
7 "id": "MessageSender", 7 "id": "MessageSender",
8 "type": "object", 8 "type": "object",
9 "description": "An object containing information about the script contex t that sent a message or request.", 9 "description": "An object containing information about the script contex t that sent a message or request.",
10 "properties": { 10 "properties": {
(...skipping 3173 matching lines...) Expand 10 before | Expand all | Expand 10 after
3184 "name": "onDrop", 3184 "name": "onDrop",
3185 "type": "function", 3185 "type": "function",
3186 "description": "Fired when the user drops bookmarks on the document", 3186 "description": "Fired when the user drops bookmarks on the document",
3187 "parameters": [ 3187 "parameters": [
3188 {"$ref": "BookmarkNodeData"} 3188 {"$ref": "BookmarkNodeData"}
3189 ] 3189 ]
3190 } 3190 }
3191 ] 3191 ]
3192 }, 3192 },
3193 { 3193 {
3194 "namespace": "experimental.downloads",
3195 "nodoc": "true",
3196 "events": [
3197 {
3198 "name": "onCreated",
3199 "type": "function",
3200 "unprivileged": true,
3201 "description": "Fires when a download begins.",
3202 "parameters": [
3203 {"$ref": "DownloadItem"}
3204 ]
3205 },
3206 {
3207 "name": "onChanged",
3208 "type": "function",
3209 "unprivileged": true,
3210 "description": "Fires when a property of a DownloadItem changes.",
3211 "parameters": [
3212 {"$ref": "DownloadDelta"}
3213 ]
3214 },
3215 {
3216 "name": "onErased",
3217 "type": "function",
3218 "unprivileged": true,
3219 "description": "Fires when a download is erased from history.",
3220 "parameters": [
3221 {"type": "integer", "name": "download_id"}
Mihai Parparita -not on Chrome 2011/07/28 23:18:29 For consistency, the name of this parameter should
benjhayden 2011/08/01 21:43:51 Done.
3222 ]
3223 }
3224 ],
3225 "properties": {
3226 "STATE_IN_PROGRESS": {
3227 "type": "string",
3228 "value": "in progress",
Mihai Parparita -not on Chrome 2011/07/28 23:18:29 Enum values are generally in hacker_style.
benjhayden 2011/08/01 21:43:51 Done.
3229 "description": "The download is currently receiving data from the server ."
3230 },
3231 "STATE_INTERRUPTED": {
3232 "type": "string",
3233 "value": "interrupted",
3234 "description": "An error broke the connection with the file host."
3235 },
3236 "STATE_COMPLETE": {
3237 "type": "string",
3238 "value": "complete",
3239 "description": "The download has completed."
3240 },
3241 "DANGER_SAFE": {
3242 "type": "string",
3243 "value": "safe",
3244 "description": "The file has been determined to present no known danger to the user's computer."
3245 },
3246 "DANGER_FILE": {
3247 "type": "string",
3248 "value": "file",
3249 "description": "The download's filename is suspicious."
3250 },
3251 "DANGER_URL": {
3252 "type": "string",
3253 "value": "url",
3254 "description": "The download's URL is suspicious."
3255 }
3256 },
3257 "types": [
3258 {
3259 "id": "DownloadItem",
3260 "type": "object",
3261 "description": "The state of a file as it is downloaded from the interne t.",
3262 "properties": {
3263 "id": {"type": "integer", "description": "An identifier that is persis tent across browser sessions."},
3264 "url": {"type": "string", "description": "absolute URL"},
Mihai Parparita -not on Chrome 2011/07/28 23:18:29 Probably premature at this point, but all the desc
benjhayden 2011/08/01 21:43:51 Done.
3265 "filename": {"type": "string", "description": "absolute local path"},
3266 "danger": {"type": "string", "description": "Safety", "enum": ["safe", "file", "url"]},
3267 "dangerAccepted": {"type": "boolean", "description": "true if the user has accepted the download's danger."},
3268 "mime": {"type": "string", "description": "The file's MIME type."},
3269 "startTime": {"type": "integer", "description": "ms since epoch"},
3270 "endTime": {"type": "integer", "description": "ms since epoch"},
3271 "state": {"type": "string", "description": "", "enum": ["in progress", "complete", "interrupted"]},
3272 "paused": {"type": "boolean", "description": "true if the download has stopped reading data"},
3273 "error": {"type": "integer", "description": "net error code if state i s interrupted"},
3274 "bytesReceived": {"type": "integer", "description": "pre-decompression "},
3275 "totalBytes": {"type": "integer", "description": "pre-decompression"},
3276 "fileSize": {"type": "integer", "description": "post-decompression"}
3277 }
3278 },
3279 {
3280 "id": "DownloadOptions",
3281 "type": "object",
3282 "properties": {
3283 "url": {"type": "string", "description": "The URL to download."},
3284 "filename": {"type": "string", "description": "relative local path", " optional": true},
3285 "saveAs": {"type": "boolean", "optional": true, "description": "Show t he Save File As dialog."},
3286 "method": {"type": "string", "description": "GET or POST", "optional": true},
3287 "headers": {"type": "object", "description": "request headers", "optio nal": true, "properties": {}, "additionalProperties": { "type": "any" }},
3288 "body": {"type": "string", "description": "post body", "optional": tru e}
3289 }
3290 },
3291 {
3292 "id": "DownloadQuery",
3293 "type": "object",
3294 "description": "",
3295 "properties": {
3296 "query": {"type": "string", "description": "boolean search terms", "op tional": true},
3297 "startedBefore": {"type": "integer", "description": "ms since epoch", "optional": true},
3298 "startedAfter": {"type": "integer", "description": "ms since epoch", " optional": true},
3299 "endedBefore": {"type": "integer", "description": "ms since epoch", "o ptional": true},
3300 "endedAfter": {"type": "integer", "description": "ms since epoch", "op tional": true},
3301 "totalBytesGreater": {"type": "integer", "description": "", "optional" : true},
3302 "totalBytesLess": {"type": "integer", "description": "", "optional": t rue},
3303 "filenameRegex": {"type": "string", "description": "", "optional": tru e},
3304 "urlRegex": {"type": "string", "description": "", "optional": true},
3305 "limit": {"type": "integer", "optional": true, "description": ""},
3306 "orderBy": {"type": "string", "optional": true, "description": ""},
3307 "id": {"type": "integer", "description": "A persistent identifier", "o ptional": true},
3308 "url": {"type": "string", "description": "absolute URL", "optional": t rue},
3309 "filename": {"type": "string", "description": "absolute local path", " optional": true},
3310 "danger": {"type": "string", "description": "Safety", "optional": true , "enum": ["safe", "file", "url"]},
3311 "dangerAccepted": {"type": "boolean", "description": "true if the user has accepted the download's danger.", "optional": true},
3312 "mime": {"type": "string", "description": "The file's MIME type.", "op tional": true},
3313 "startTime": {"type": "integer", "description": "ms since epoch", "opt ional": true},
3314 "endTime": {"type": "integer", "description": "ms since epoch", "optio nal": true},
3315 "state": {"type": "string", "description": "", "optional": true, "enum ": ["in progress", "complete", "interrupted"]},
3316 "paused": {"type": "boolean", "description": "true if the download has stopped reading data", "optional": true},
3317 "error": {"type": "integer", "description": "net error code if state i s interrupted", "optional": true},
3318 "bytesReceived": {"type": "integer", "description": "pre-decompression ", "optional": true},
3319 "totalBytes": {"type": "integer", "description": "pre-decompression", "optional": true},
3320 "fileSize": {"type": "integer", "description": "post-decompression", " optional": true}
3321 }
3322 },
3323 {
3324 "id": "DownloadIntegerDiff",
3325 "type": "object",
3326 "description": "",
3327 "properties": {
3328 }
3329 },
3330 {
3331 "id": "DownloadDelta",
3332 "type": "object",
3333 "description": "",
3334 "properties": {
3335 }
3336 },
3337 {
3338 "id": "DownloadResponse",
3339 "type": "object",
3340 "description": "Result of download()",
3341 "properties": {
3342 "id": {"type": "integer", "optional": true},
3343 "error": {"type": "integer", "optional": true}
3344 }
3345 }
3346 ],
3347 "functions": [
3348 {
3349 "name": "download",
3350 "type": "function",
3351 "description": "Download a URL.",
3352 "parameters": [
3353 {"$ref": "DownloadOptions"},
3354 {
3355 "name": "callback",
3356 "type": "function",
3357 "optional": true,
3358 "parameters": [
3359 {"$ref": "DownloadResponse"}
3360 ]
3361 }
3362 ]
3363 },
3364 {
3365 "name": "search",
3366 "type": "function",
3367 "description": "Find DownloadItems",
3368 "parameters": [
3369 {"$ref": "DownloadQuery"},
3370 {
3371 "name": "callback",
3372 "type": "function",
3373 "optional": true,
3374 "parameters": [
3375 {"name": "items", "type": "array"}
3376 ]
3377 }
3378 ]
3379 },
3380 {
3381 "name": "erase",
3382 "type": "function",
3383 "description": "Erase DownloadItems from history",
3384 "parameters": [
3385 {"$ref": "DownloadQuery"},
3386 {
3387 "name": "callback",
3388 "type": "function",
3389 "optional": true,
3390 "parameters": [
3391 {"name": "ids", "type": "array"}
3392 ]
3393 }
3394 ]
3395 },
3396 {
3397 "name": "setDestination",
3398 "type": "function",
3399 "description": "Move a downloaded file",
3400 "parameters": [
3401 {"name": "id", "type": "integer"},
3402 {"name": "path", "type": "string"}
3403 ]
3404 },
3405 {
3406 "name": "acceptDanger",
3407 "type": "function",
3408 "description": "Accept a dangerous download",
3409 "parameters": [
3410 {"name": "id", "type": "integer"}
3411 ]
3412 },
3413 {
3414 "name": "show",
3415 "type": "function",
3416 "description": "Show in folder",
3417 "parameters": [
3418 {"name": "id", "type": "integer"}
3419 ]
3420 },
3421 {
3422 "name": "drag",
3423 "type": "function",
3424 "description": "Drag the file to another application",
3425 "parameters": [
3426 {"name": "id", "type": "integer"}
3427 ]
3428 },
3429 {
3430 "name": "pause",
3431 "type": "function",
3432 "description": "Pause the download",
3433 "parameters": [
3434 {"name": "id", "type": "integer"}
3435 ]
3436 },
3437 {
3438 "name": "resume",
3439 "type": "function",
3440 "description": "Resume a paused download",
3441 "parameters": [
3442 {"name": "id", "type": "integer"}
3443 ]
3444 },
3445 {
3446 "name": "cancel",
3447 "type": "function",
3448 "description": "Cancel a download",
3449 "parameters": [
3450 {"name": "id", "type": "integer"}
3451 ]
3452 }
3453 ]
3454 },
3455 {
3194 "namespace": "devtools", 3456 "namespace": "devtools",
3195 "nodoc": "true", 3457 "nodoc": "true",
3196 "types": [], 3458 "types": [],
3197 "functions": [ 3459 "functions": [
3198 { 3460 {
3199 "name": "getTabEvents", 3461 "name": "getTabEvents",
3200 "type": "function", 3462 "type": "function",
3201 "description": "Experimental support for timeline API", 3463 "description": "Experimental support for timeline API",
3202 "nodoc": "true", 3464 "nodoc": "true",
3203 "parameters": [ 3465 "parameters": [
(...skipping 3596 matching lines...) Expand 10 before | Expand all | Expand 10 after
6800 "description": "A string result code. The value is non-empty on success only in tests.", 7062 "description": "A string result code. The value is non-empty on success only in tests.",
6801 "optional": "true" 7063 "optional": "true"
6802 } 7064 }
6803 ] 7065 ]
6804 } 7066 }
6805 ] 7067 ]
6806 } 7068 }
6807 ] 7069 ]
6808 } 7070 }
6809 ] 7071 ]
OLDNEW
« chrome/browser/extensions/extension_downloads_api.cc ('K') | « chrome/chrome_browser.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698