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

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: Bearings Before Woods Created 9 years, 6 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 2846 matching lines...) Expand 10 before | Expand all | Expand 10 after
2857 "name": "onDrop", 2857 "name": "onDrop",
2858 "type": "function", 2858 "type": "function",
2859 "description": "Fired when the user drops bookmarks on the document", 2859 "description": "Fired when the user drops bookmarks on the document",
2860 "parameters": [ 2860 "parameters": [
2861 {"$ref": "BookmarkNodeData"} 2861 {"$ref": "BookmarkNodeData"}
2862 ] 2862 ]
2863 } 2863 }
2864 ] 2864 ]
2865 }, 2865 },
2866 { 2866 {
2867 "namespace": "experimental.downloads",
2868 "types": [
2869 {
2870 "id": "DownloadItem",
2871 "type": "object",
2872 "description": "The state of a downloading file.",
2873 "properties": {
2874 "id": {"type": "integer", "description": "A persistent identifier"},
2875 "url": {"type": "string", "description": "absolute URL"},
2876 "filename": {"type": "string", "description": "absolute local path"},
2877 "danger": {"type": "string", "description": "Safety"},
2878 "danger_accepted": {"type": "boolean", "description": "true if the use r has accepted the download's danger."},
2879 "mime": {"type": "string", "description": "The file's MIME type."},
2880 "start_time": {"type": "integer", "description": "ms since epoch"},
2881 "end_time": {"type": "integer", "description": "ms since epoch"},
2882 "state": {"type": "string", "description": "in_progress, complete, or interrupted"},
2883 "paused": {"type": "boolean", "description": "true if the download has stopped reading data"},
2884 "error": {"type": "integer", "description": "net error code if state i s interrupted"},
2885 "bytes_received": {"type": "integer", "description": "pre-decompressio n"},
2886 "total_bytes": {"type": "integer", "description": "pre-decompression"} ,
2887 "file_size": {"type": "integer", "description": "post-decompression"}
2888 }
2889 },
2890 {
2891 "id": "DownloadOptions",
2892 "type": "object",
2893 "properties": {
2894 "url": {"type": "string", "description": "The URL to download."},
2895 "filename": {"type": "string", "description": "relative local path", " optional": true},
2896 "save_as": {"type": "boolean", "optional": true, "description": "Show the Save File As dialog."},
2897 "method": {"type": "string", "description": "GET or POST", "optional": true},
2898 "headers": {"type": "object", "description": "request headers", "optio nal": true, "properties": {}, "additionalProperties": { "type": "any" }},
2899 "body": {"type": "string", "description": "post body", "optional": tru e}
2900 }
2901 },
2902 {
2903 "id": "DownloadQuery",
2904 "type": "object",
2905 "description": "",
2906 "properties": {
2907 "query": {"type": "string", "description": "boolean search terms", "op tional": true},
2908 "started_before": {"type": "integer", "description": "ms since epoch", "optional": true},
2909 "started_after": {"type": "integer", "description": "ms since epoch", "optional": true},
2910 "ended_before": {"type": "integer", "description": "ms since epoch", " optional": true},
2911 "ended_after": {"type": "integer", "description": "ms since epoch", "o ptional": true},
2912 "total_bytes_greater": {"type": "integer", "description": "", "optiona l": true},
2913 "total_bytes_less": {"type": "integer", "description": "", "optional": true},
2914 "filename_re": {"type": "string", "description": "", "optional": true} ,
2915 "url_re": {"type": "string", "description": "", "optional": true},
2916 "id": {"type": "integer", "description": "A persistent identifier", "o ptional": true},
2917 "url": {"type": "string", "description": "absolute URL", "optional": t rue},
2918 "filename": {"type": "string", "description": "absolute local path", " optional": true},
2919 "danger": {"type": "string", "description": "Safety", "optional": true },
2920 "danger_accepted": {"type": "boolean", "description": "true if the use r has accepted the download's danger.", "optional": true},
2921 "mime": {"type": "string", "description": "The file's MIME type.", "op tional": true},
2922 "start_time": {"type": "integer", "description": "ms since epoch", "op tional": true},
2923 "end_time": {"type": "integer", "description": "ms since epoch", "opti onal": true},
2924 "state": {"type": "string", "description": "in_progress, complete, or interrupted", "optional": true},
2925 "paused": {"type": "boolean", "description": "true if the download has stopped reading data", "optional": true},
2926 "error": {"type": "integer", "description": "net error code if state i s interrupted", "optional": true},
2927 "bytes_received": {"type": "integer", "description": "pre-decompressio n", "optional": true},
2928 "total_bytes": {"type": "integer", "description": "pre-decompression", "optional": true},
2929 "file_size": {"type": "integer", "description": "post-decompression", "optional": true}
2930 }
2931 },
2932 {
2933 "id": "DownloadResponse",
2934 "type": "object",
2935 "description": "Result of download()",
2936 "properties": {
2937 "id": {"type": "integer", "optional": true},
2938 "error": {"type": "integer", "optional": true}
2939 }
2940 }
2941 ],
2942 "functions": [
2943 {
2944 "name": "download",
2945 "type": "function",
2946 "description": "Download a URL.",
2947 "parameters": [
2948 {"$ref": "DownloadOptions"},
2949 {
2950 "name": "callback",
2951 "type": "function",
2952 "optional": true,
2953 "parameters": [
2954 {"$ref": "DownloadResponse"}
2955 ]
2956 }
2957 ]
2958 },
2959 {
2960 "name": "search",
2961 "type": "function",
2962 "description": "Find DownloadItems",
2963 "parameters": [
2964 {"$ref": "DownloadQuery"},
2965 {
2966 "name": "callback",
2967 "type": "function",
2968 "optional": true,
2969 "parameters": [
2970 {"name": "items", "type": "array"}
2971 ]
2972 }
2973 ]
2974 },
2975 {
2976 "name": "erase",
2977 "type": "function",
2978 "description": "Erase DownloadItems from history",
2979 "parameters": [
2980 {"$ref": "DownloadQuery"},
2981 {
2982 "name": "callback",
2983 "type": "function",
2984 "optional": true,
2985 "parameters": [
2986 {"name": "ids", "type": "array"}
2987 ]
2988 }
2989 ]
2990 },
2991 {
2992 "name": "set_destination",
2993 "type": "function",
2994 "description": "Move a downloaded file",
2995 "parameters": [
2996 {"name": "id", "type": "integer"},
2997 {"name": "path", "type": "string"}
2998 ]
2999 },
3000 {
3001 "name": "accept_danger",
3002 "type": "function",
3003 "description": "Accept a dangerous download",
3004 "parameters": [
3005 {"name": "id", "type": "integer"}
3006 ]
3007 },
3008 {
3009 "name": "show",
3010 "type": "function",
3011 "description": "Show in folder",
3012 "parameters": [
3013 {"name": "id", "type": "integer"}
3014 ]
3015 },
3016 {
3017 "name": "drag",
3018 "type": "function",
3019 "description": "Drag the file to another application",
3020 "parameters": [
3021 {"name": "id", "type": "integer"}
3022 ]
3023 },
3024 {
3025 "name": "pause",
3026 "type": "function",
3027 "description": "Pause the download",
3028 "parameters": [
3029 {"name": "id", "type": "integer"}
3030 ]
3031 },
3032 {
3033 "name": "resume",
3034 "type": "function",
3035 "description": "Resume a paused download",
3036 "parameters": [
3037 {"name": "id", "type": "integer"}
3038 ]
3039 },
3040 {
3041 "name": "cancel",
3042 "type": "function",
3043 "description": "Cancel a download",
3044 "parameters": [
3045 {"name": "id", "type": "integer"}
3046 ]
3047 }
3048 ]
3049 },
3050 {
2867 "namespace": "devtools", 3051 "namespace": "devtools",
2868 "nodoc": "true", 3052 "nodoc": "true",
2869 "types": [], 3053 "types": [],
2870 "functions": [ 3054 "functions": [
2871 { 3055 {
2872 "name": "getTabEvents", 3056 "name": "getTabEvents",
2873 "type": "function", 3057 "type": "function",
2874 "description": "Experimental support for timeline API", 3058 "description": "Experimental support for timeline API",
2875 "nodoc": "true", 3059 "nodoc": "true",
2876 "parameters": [ 3060 "parameters": [
(...skipping 3290 matching lines...) Expand 10 before | Expand all | Expand 10 after
6167 { 6351 {
6168 "type": "integer", 6352 "type": "integer",
6169 "name": "tabId", 6353 "name": "tabId",
6170 "description": "The id of the tab that was detached." 6354 "description": "The id of the tab that was detached."
6171 } 6355 }
6172 ] 6356 ]
6173 } 6357 }
6174 ] 6358 ]
6175 } 6359 }
6176 ] 6360 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698