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

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

Issue 7192016: chrome.experimental.downloads (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merged db_handle, id; onCreated, onErased Created 9 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
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/common/extensions/docs/experimental.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2991 matching lines...) Expand 10 before | Expand all | Expand 10 after
3002 "name": "onDrop", 3002 "name": "onDrop",
3003 "type": "function", 3003 "type": "function",
3004 "description": "Fired when the user drops bookmarks on the document", 3004 "description": "Fired when the user drops bookmarks on the document",
3005 "parameters": [ 3005 "parameters": [
3006 {"$ref": "BookmarkNodeData"} 3006 {"$ref": "BookmarkNodeData"}
3007 ] 3007 ]
3008 } 3008 }
3009 ] 3009 ]
3010 }, 3010 },
3011 { 3011 {
3012 "namespace": "experimental.downloads",
3013 "events": [
3014 {
3015 "name": "onCreated",
3016 "type": "function",
3017 "unprivileged": true,
3018 "description": "",
3019 "parameters": [
3020 {"$ref": "DownloadItem"}
3021 ]
3022 },
3023 {
3024 "name": "onChanged",
3025 "type": "function",
3026 "unprivileged": true,
3027 "description": "",
3028 "parameters": [
3029 {"$ref": "DownloadDelta"}
3030 ]
3031 },
3032 {
3033 "name": "onErased",
3034 "type": "function",
3035 "unprivileged": true,
3036 "description": "",
3037 "parameters": [
3038 {"type": "integer", "name": "download_id"}
3039 ]
3040 }
3041 ],
3042 "properties": {
3043 "STATE_IN_PROGRESS": {
3044 "type": "string",
3045 "value": "in progress",
3046 "description": "The download is currently receiving data from the server ."
3047 },
3048 "STATE_INTERRUPTED": {
3049 "type": "string",
3050 "value": "interrupted",
3051 "description": "An error broke the connection with the file host."
3052 },
3053 "STATE_COMPLETE": {
3054 "type": "string",
3055 "value": "complete",
3056 "description": "The download has completed."
3057 },
3058 "DANGER_SAFE": {
3059 "type": "string",
3060 "value": "safe",
3061 "description": "The file has been determined to present no known danger to the user's computer."
3062 },
3063 "DANGER_FILE": {
3064 "type": "string",
3065 "value": "file",
3066 "description": "The download's filename is suspicious."
3067 },
3068 "DANGER_URL": {
3069 "type": "string",
3070 "value": "url",
3071 "description": "The download's URL is suspicious."
3072 }
3073 },
3074 "types": [
3075 {
3076 "id": "DownloadItem",
3077 "type": "object",
3078 "description": "The state of a downloading file.",
3079 "properties": {
3080 "id": {"type": "integer", "description": "A persistent identifier"},
3081 "url": {"type": "string", "description": "absolute URL"},
3082 "filename": {"type": "string", "description": "absolute local path"},
3083 "danger": {"type": "string", "description": "Safety", "enum": ["safe", "file", "url"]},
3084 "dangerAccepted": {"type": "boolean", "description": "true if the user has accepted the download's danger."},
3085 "mime": {"type": "string", "description": "The file's MIME type."},
3086 "startTime": {"type": "integer", "description": "ms since epoch"},
3087 "endTime": {"type": "integer", "description": "ms since epoch"},
3088 "state": {"type": "string", "description": "", "enum": ["in progress", "complete", "interrupted"]},
3089 "paused": {"type": "boolean", "description": "true if the download has stopped reading data"},
3090 "error": {"type": "integer", "description": "net error code if state i s interrupted"},
3091 "bytesReceived": {"type": "integer", "description": "pre-decompression "},
3092 "totalBytes": {"type": "integer", "description": "pre-decompression"},
3093 "fileSize": {"type": "integer", "description": "post-decompression"}
3094 }
3095 },
3096 {
3097 "id": "DownloadOptions",
3098 "type": "object",
3099 "properties": {
3100 "url": {"type": "string", "description": "The URL to download."},
3101 "filename": {"type": "string", "description": "relative local path", " optional": true},
3102 "saveAs": {"type": "boolean", "optional": true, "description": "Show t he Save File As dialog."},
3103 "method": {"type": "string", "description": "GET or POST", "optional": true},
3104 "headers": {"type": "object", "description": "request headers", "optio nal": true, "properties": {}, "additionalProperties": { "type": "any" }},
3105 "body": {"type": "string", "description": "post body", "optional": tru e}
3106 }
3107 },
3108 {
3109 "id": "DownloadQuery",
3110 "type": "object",
3111 "description": "",
3112 "properties": {
3113 "query": {"type": "string", "description": "boolean search terms", "op tional": true},
3114 "startedBefore": {"type": "integer", "description": "ms since epoch", "optional": true},
3115 "startedAfter": {"type": "integer", "description": "ms since epoch", " optional": true},
3116 "endedBefore": {"type": "integer", "description": "ms since epoch", "o ptional": true},
3117 "endedAfter": {"type": "integer", "description": "ms since epoch", "op tional": true},
3118 "totalBytesGreater": {"type": "integer", "description": "", "optional" : true},
3119 "totalBytesLess": {"type": "integer", "description": "", "optional": t rue},
3120 "filenameRegex": {"type": "string", "description": "", "optional": tru e},
3121 "urlRegex": {"type": "string", "description": "", "optional": true},
3122 "limit": {"type": "integer", "optional": true, "description": ""},
3123 "orderBy": {"type": "string", "optional": true, "description": ""},
3124 "id": {"type": "integer", "description": "A persistent identifier", "o ptional": true},
3125 "url": {"type": "string", "description": "absolute URL", "optional": t rue},
3126 "filename": {"type": "string", "description": "absolute local path", " optional": true},
3127 "danger": {"type": "string", "description": "Safety", "optional": true , "enum": ["safe", "file", "url"]},
3128 "dangerAccepted": {"type": "boolean", "description": "true if the user has accepted the download's danger.", "optional": true},
3129 "mime": {"type": "string", "description": "The file's MIME type.", "op tional": true},
3130 "startTime": {"type": "integer", "description": "ms since epoch", "opt ional": true},
3131 "endTime": {"type": "integer", "description": "ms since epoch", "optio nal": true},
3132 "state": {"type": "string", "description": "", "optional": true, "enum ": ["in progress", "complete", "interrupted"]},
3133 "paused": {"type": "boolean", "description": "true if the download has stopped reading data", "optional": true},
3134 "error": {"type": "integer", "description": "net error code if state i s interrupted", "optional": true},
3135 "bytesReceived": {"type": "integer", "description": "pre-decompression ", "optional": true},
3136 "totalBytes": {"type": "integer", "description": "pre-decompression", "optional": true},
3137 "fileSize": {"type": "integer", "description": "post-decompression", " optional": true}
3138 }
3139 },
3140 {
3141 "id": "DownloadIntegerDiff",
3142 "type": "object",
3143 "description": "",
3144 "properties": {
3145 }
3146 },
3147 {
3148 "id": "DownloadDelta",
3149 "type": "object",
3150 "description": "",
3151 "properties": {
3152 }
3153 },
3154 {
3155 "id": "DownloadResponse",
3156 "type": "object",
3157 "description": "Result of download()",
3158 "properties": {
3159 "id": {"type": "integer", "optional": true},
3160 "error": {"type": "integer", "optional": true}
3161 }
3162 }
3163 ],
3164 "functions": [
3165 {
3166 "name": "download",
3167 "type": "function",
3168 "description": "Download a URL.",
3169 "parameters": [
3170 {"$ref": "DownloadOptions"},
3171 {
3172 "name": "callback",
3173 "type": "function",
3174 "optional": true,
3175 "parameters": [
3176 {"$ref": "DownloadResponse"}
3177 ]
3178 }
3179 ]
3180 },
3181 {
3182 "name": "search",
3183 "type": "function",
3184 "description": "Find DownloadItems",
3185 "parameters": [
3186 {"$ref": "DownloadQuery"},
3187 {
3188 "name": "callback",
3189 "type": "function",
3190 "optional": true,
3191 "parameters": [
3192 {"name": "items", "type": "array"}
3193 ]
3194 }
3195 ]
3196 },
3197 {
3198 "name": "erase",
3199 "type": "function",
3200 "description": "Erase DownloadItems from history",
3201 "parameters": [
3202 {"$ref": "DownloadQuery"},
3203 {
3204 "name": "callback",
3205 "type": "function",
3206 "optional": true,
3207 "parameters": [
3208 {"name": "ids", "type": "array"}
3209 ]
3210 }
3211 ]
3212 },
3213 {
3214 "name": "setDestination",
3215 "type": "function",
3216 "description": "Move a downloaded file",
3217 "parameters": [
3218 {"name": "id", "type": "integer"},
3219 {"name": "path", "type": "string"}
3220 ]
3221 },
3222 {
3223 "name": "acceptDanger",
3224 "type": "function",
3225 "description": "Accept a dangerous download",
3226 "parameters": [
3227 {"name": "id", "type": "integer"}
3228 ]
3229 },
3230 {
3231 "name": "show",
3232 "type": "function",
3233 "description": "Show in folder",
3234 "parameters": [
3235 {"name": "id", "type": "integer"}
3236 ]
3237 },
3238 {
3239 "name": "drag",
3240 "type": "function",
3241 "description": "Drag the file to another application",
3242 "parameters": [
3243 {"name": "id", "type": "integer"}
3244 ]
3245 },
3246 {
3247 "name": "pause",
3248 "type": "function",
3249 "description": "Pause the download",
3250 "parameters": [
3251 {"name": "id", "type": "integer"}
3252 ]
3253 },
3254 {
3255 "name": "resume",
3256 "type": "function",
3257 "description": "Resume a paused download",
3258 "parameters": [
3259 {"name": "id", "type": "integer"}
3260 ]
3261 },
3262 {
3263 "name": "cancel",
3264 "type": "function",
3265 "description": "Cancel a download",
3266 "parameters": [
3267 {"name": "id", "type": "integer"}
3268 ]
3269 }
3270 ]
3271 },
3272 {
3012 "namespace": "devtools", 3273 "namespace": "devtools",
3013 "nodoc": "true", 3274 "nodoc": "true",
3014 "types": [], 3275 "types": [],
3015 "functions": [ 3276 "functions": [
3016 { 3277 {
3017 "name": "getTabEvents", 3278 "name": "getTabEvents",
3018 "type": "function", 3279 "type": "function",
3019 "description": "Experimental support for timeline API", 3280 "description": "Experimental support for timeline API",
3020 "nodoc": "true", 3281 "nodoc": "true",
3021 "parameters": [ 3282 "parameters": [
(...skipping 3387 matching lines...) Expand 10 before | Expand all | Expand 10 after
6409 "type": "function", 6670 "type": "function",
6410 "name": "callback", 6671 "name": "callback",
6411 "optional": true, 6672 "optional": true,
6412 "description": "A callback when the function is complete. Any errors will be reported in <a href='extension.html#property-lastError'>chrome.extensio n.lastError</a>." 6673 "description": "A callback when the function is complete. Any errors will be reported in <a href='extension.html#property-lastError'>chrome.extensio n.lastError</a>."
6413 } 6674 }
6414 ] 6675 ]
6415 } 6676 }
6416 ] 6677 ]
6417 } 6678 }
6418 ] 6679 ]
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/common/extensions/docs/experimental.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698