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

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: DownloadQuery, single DownloadMap 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/bookmarks.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 2844 matching lines...) Expand 10 before | Expand all | Expand 10 after
2855 "name": "onDrop", 2855 "name": "onDrop",
2856 "type": "function", 2856 "type": "function",
2857 "description": "Fired when the user drops bookmarks on the document", 2857 "description": "Fired when the user drops bookmarks on the document",
2858 "parameters": [ 2858 "parameters": [
2859 {"$ref": "BookmarkNodeData"} 2859 {"$ref": "BookmarkNodeData"}
2860 ] 2860 ]
2861 } 2861 }
2862 ] 2862 ]
2863 }, 2863 },
2864 { 2864 {
2865 "namespace": "experimental.downloads",
2866 "properties": {
2867 "STATE_IN_PROGRESS": {
2868 "type": "string",
2869 "value": "in progress",
2870 "description": "The download is currently receiving data from the server ."
2871 },
2872 "STATE_INTERRUPTED": {
2873 "type": "string",
2874 "value": "interrupted",
2875 "description": "An error broke the connection with the file host."
2876 },
2877 "STATE_COMPLETE": {
2878 "type": "string",
2879 "value": "complete",
2880 "description": "The download has completed."
2881 },
2882 "DANGER_SAFE": {
2883 "type": "string",
2884 "value": "safe",
2885 "description": "The file has been determined to present no known danger to the user's computer."
2886 },
2887 "DANGER_FILE": {
2888 "type": "string",
2889 "value": "file",
2890 "description": "The download's filename is suspicious."
2891 },
2892 "DANGER_URL": {
2893 "type": "string",
2894 "value": "url",
2895 "description": "The download's URL is suspicious."
2896 }
2897 },
2898 "types": [
2899 {
2900 "id": "DownloadItem",
2901 "type": "object",
2902 "description": "The state of a downloading file.",
2903 "properties": {
2904 "id": {"type": "integer", "description": "A persistent identifier"},
2905 "url": {"type": "string", "description": "absolute URL"},
2906 "filename": {"type": "string", "description": "absolute local path"},
2907 "danger": {"type": "string", "description": "Safety", "enum": ["safe", "file", "url"]},
2908 "dangerAccepted": {"type": "boolean", "description": "true if the user has accepted the download's danger."},
2909 "mime": {"type": "string", "description": "The file's MIME type."},
2910 "startTime": {"type": "integer", "description": "ms since epoch"},
2911 "endTime": {"type": "integer", "description": "ms since epoch"},
2912 "state": {"type": "string", "description": "", "enum": ["in progress", "complete", "interrupted"]},
2913 "paused": {"type": "boolean", "description": "true if the download has stopped reading data"},
2914 "error": {"type": "integer", "description": "net error code if state i s interrupted"},
2915 "bytesReceived": {"type": "integer", "description": "pre-decompression "},
2916 "totalBytes": {"type": "integer", "description": "pre-decompression"},
2917 "fileSize": {"type": "integer", "description": "post-decompression"}
2918 }
2919 },
2920 {
2921 "id": "DownloadOptions",
2922 "type": "object",
2923 "properties": {
2924 "url": {"type": "string", "description": "The URL to download."},
2925 "filename": {"type": "string", "description": "relative local path", " optional": true},
2926 "saveAs": {"type": "boolean", "optional": true, "description": "Show t he Save File As dialog."},
2927 "method": {"type": "string", "description": "GET or POST", "optional": true},
2928 "headers": {"type": "object", "description": "request headers", "optio nal": true, "properties": {}, "additionalProperties": { "type": "any" }},
2929 "body": {"type": "string", "description": "post body", "optional": tru e}
2930 }
2931 },
2932 {
2933 "id": "DownloadQuery",
2934 "type": "object",
2935 "description": "",
2936 "properties": {
2937 "query": {"type": "string", "description": "boolean search terms", "op tional": true},
2938 "startedBefore": {"type": "integer", "description": "ms since epoch", "optional": true},
2939 "startedAfter": {"type": "integer", "description": "ms since epoch", " optional": true},
2940 "endedBefore": {"type": "integer", "description": "ms since epoch", "o ptional": true},
2941 "endedAfter": {"type": "integer", "description": "ms since epoch", "op tional": true},
2942 "totalBytesGreater": {"type": "integer", "description": "", "optional" : true},
2943 "totalBytesLess": {"type": "integer", "description": "", "optional": t rue},
2944 "filenameRegex": {"type": "string", "description": "", "optional": tru e},
2945 "urlRegex": {"type": "string", "description": "", "optional": true},
2946 "limit": {"type": "integer", "optional": true, "description": ""},
2947 "orderBy": {"type": "string", "optional": true, "description": ""},
2948 "id": {"type": "integer", "description": "A persistent identifier", "o ptional": true},
2949 "url": {"type": "string", "description": "absolute URL", "optional": t rue},
2950 "filename": {"type": "string", "description": "absolute local path", " optional": true},
2951 "danger": {"type": "string", "description": "Safety", "optional": true , "enum": ["safe", "file", "url"]},
2952 "dangerAccepted": {"type": "boolean", "description": "true if the user has accepted the download's danger.", "optional": true},
2953 "mime": {"type": "string", "description": "The file's MIME type.", "op tional": true},
2954 "startTime": {"type": "integer", "description": "ms since epoch", "opt ional": true},
2955 "endTime": {"type": "integer", "description": "ms since epoch", "optio nal": true},
2956 "state": {"type": "string", "description": "", "optional": true, "enum ": ["in progress", "complete", "interrupted"]},
2957 "paused": {"type": "boolean", "description": "true if the download has stopped reading data", "optional": true},
2958 "error": {"type": "integer", "description": "net error code if state i s interrupted", "optional": true},
2959 "bytesReceived": {"type": "integer", "description": "pre-decompression ", "optional": true},
2960 "totalBytes": {"type": "integer", "description": "pre-decompression", "optional": true},
2961 "fileSize": {"type": "integer", "description": "post-decompression", " optional": true}
2962 }
2963 },
2964 {
2965 "id": "DownloadResponse",
2966 "type": "object",
2967 "description": "Result of download()",
2968 "properties": {
2969 "id": {"type": "integer", "optional": true},
2970 "error": {"type": "integer", "optional": true}
2971 }
2972 }
2973 ],
2974 "functions": [
2975 {
2976 "name": "download",
2977 "type": "function",
2978 "description": "Download a URL.",
2979 "parameters": [
2980 {"$ref": "DownloadOptions"},
2981 {
2982 "name": "callback",
2983 "type": "function",
2984 "optional": true,
2985 "parameters": [
2986 {"$ref": "DownloadResponse"}
2987 ]
2988 }
2989 ]
2990 },
2991 {
2992 "name": "search",
2993 "type": "function",
2994 "description": "Find DownloadItems",
2995 "parameters": [
2996 {"$ref": "DownloadQuery"},
2997 {
2998 "name": "callback",
2999 "type": "function",
3000 "optional": true,
3001 "parameters": [
3002 {"name": "items", "type": "array"}
3003 ]
3004 }
3005 ]
3006 },
3007 {
3008 "name": "erase",
3009 "type": "function",
3010 "description": "Erase DownloadItems from history",
3011 "parameters": [
3012 {"$ref": "DownloadQuery"},
3013 {
3014 "name": "callback",
3015 "type": "function",
3016 "optional": true,
3017 "parameters": [
3018 {"name": "ids", "type": "array"}
3019 ]
3020 }
3021 ]
3022 },
3023 {
3024 "name": "setDestination",
3025 "type": "function",
3026 "description": "Move a downloaded file",
3027 "parameters": [
3028 {"name": "id", "type": "integer"},
3029 {"name": "path", "type": "string"}
3030 ]
3031 },
3032 {
3033 "name": "acceptDanger",
3034 "type": "function",
3035 "description": "Accept a dangerous download",
3036 "parameters": [
3037 {"name": "id", "type": "integer"}
3038 ]
3039 },
3040 {
3041 "name": "show",
3042 "type": "function",
3043 "description": "Show in folder",
3044 "parameters": [
3045 {"name": "id", "type": "integer"}
3046 ]
3047 },
3048 {
3049 "name": "drag",
3050 "type": "function",
3051 "description": "Drag the file to another application",
3052 "parameters": [
3053 {"name": "id", "type": "integer"}
3054 ]
3055 },
3056 {
3057 "name": "pause",
3058 "type": "function",
3059 "description": "Pause the download",
3060 "parameters": [
3061 {"name": "id", "type": "integer"}
3062 ]
3063 },
3064 {
3065 "name": "resume",
3066 "type": "function",
3067 "description": "Resume a paused download",
3068 "parameters": [
3069 {"name": "id", "type": "integer"}
3070 ]
3071 },
3072 {
3073 "name": "cancel",
3074 "type": "function",
3075 "description": "Cancel a download",
3076 "parameters": [
3077 {"name": "id", "type": "integer"}
3078 ]
3079 }
3080 ]
3081 },
3082 {
2865 "namespace": "devtools", 3083 "namespace": "devtools",
2866 "nodoc": "true", 3084 "nodoc": "true",
2867 "types": [], 3085 "types": [],
2868 "functions": [ 3086 "functions": [
2869 { 3087 {
2870 "name": "getTabEvents", 3088 "name": "getTabEvents",
2871 "type": "function", 3089 "type": "function",
2872 "description": "Experimental support for timeline API", 3090 "description": "Experimental support for timeline API",
2873 "nodoc": "true", 3091 "nodoc": "true",
2874 "parameters": [ 3092 "parameters": [
(...skipping 3395 matching lines...) Expand 10 before | Expand all | Expand 10 after
6270 "type": "function", 6488 "type": "function",
6271 "name": "callback", 6489 "name": "callback",
6272 "optional": true, 6490 "optional": true,
6273 "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>." 6491 "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>."
6274 } 6492 }
6275 ] 6493 ]
6276 } 6494 }
6277 ] 6495 ]
6278 } 6496 }
6279 ] 6497 ]
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/common/extensions/docs/bookmarks.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698