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

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

Issue 23537002: Adds new private API manifest for Files.app copy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 [ 5 [
6 { 6 {
7 "namespace":"fileBrowserPrivate", 7 "namespace":"fileBrowserPrivate",
8 "description": "none", 8 "description": "none",
9 "platforms": ["chromeos"], 9 "platforms": ["chromeos"],
10 "types": [ 10 "types": [
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 "description": "Approximated completed portion of the transfer opera tion." 303 "description": "Approximated completed portion of the transfer opera tion."
304 }, 304 },
305 "total": { 305 "total": {
306 "type": "number", 306 "type": "number",
307 "optional": true, 307 "optional": true,
308 "description": "Approximated total size of transfer operation." 308 "description": "Approximated total size of transfer operation."
309 } 309 }
310 } 310 }
311 }, 311 },
312 { 312 {
313 "id": "CopyProgressStatus",
314 "type": "object",
315 "description": "Payload data for copy status progress updates.",
316 "properties": {
317 "type": {
318 "type": "string",
319 "enum": ["BEGIN_ENTRY_COPY", "END_ENTRY_COPY", "PROGRESS", "SUCCESS" , "ERROR"],
320 "description": "The type of the progress event. BEGIN_ENTRY_COPY is fired for each entry (file or directory) before starting the copy operation, END _ENTRY_COPY is fired for each entry (file or directory) after ending the copy op eration. PROGRESS is fired periodically to report progress of a file copy (not d irectory). SUCCESS is fired after all entries are copied. ERROR is fired when an error occurs."
321 },
322 "url": {
323 "type": "string",
324 "optional": true,
325 "description": "URL for the entry currently being copied. This field is particularly useful when a directory copy is initiated with startCopy(). The field tells what file/directory in that directory is now being copied."
326 },
327 "size": {
328 "type": "number",
329 "optional": true,
330 "description": "Number of processed bytes for the file currently bei ng copied. Available only for PROGRESS event. To show the progress bar, a caller needs to pre-compute the size of files being copied for the file (not directory )."
331 },
332 "error": {
333 "type": "integer",
334 "optional": true,
335 "description": "FileError's code of the error. Available only for ER ROR event."
336 }
337 }
338 },
339 {
313 "id": "FileTransferCancelStatus", 340 "id": "FileTransferCancelStatus",
314 "type": "object", 341 "type": "object",
315 "description": "Payload data for file transfer cancel response.", 342 "description": "Payload data for file transfer cancel response.",
316 "properties": { 343 "properties": {
317 "fileUrl": { 344 "fileUrl": {
318 "type": "string", 345 "type": "string",
319 "description": "URL of file that is being transfered." 346 "description": "URL of file that is being transfered."
320 }, 347 },
321 "canceled": { 348 "canceled": {
322 "type": "boolean", 349 "type": "boolean",
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 "name" : "fileTransferCancelStatuses", 802 "name" : "fileTransferCancelStatuses",
776 "type": "array", 803 "type": "array",
777 "items": {"$ref": "FileTransferCancelStatus"}, 804 "items": {"$ref": "FileTransferCancelStatus"},
778 "description": "The list of FileTransferCancelStatus." 805 "description": "The list of FileTransferCancelStatus."
779 } 806 }
780 ] 807 ]
781 } 808 }
782 ] 809 ]
783 }, 810 },
784 { 811 {
812 "name": "startCopy",
813 "description": "Starts to copy an entry. If the source is directory, the copy is done recursively.",
814 "parameters": [
815 {
816 "name": "sourceUrl",
817 "type": "string",
818 "description": "URL of the source entry to be copied."
819 },
820 {
821 "name": "parent",
822 "type": "string",
823 "description": "URL of the destination directory."
824 },
825 {
826 "name": "newName",
827 "type": "string",
828 "description": "Name of the new entry."
satorux1 2013/08/29 10:03:01 This should not contain '/', right? Would be nice
hidehiko 2013/08/29 18:47:42 Done.
829 },
830 {
831 "name": "callback",
832 "type": "function",
833 "description": "Completion callback.",
834 "parameters": [
835 {
836 "name": "copyId",
837 "type": "integer",
838 "description": "ID of the copy task. Can be used to identify the progress, and to cancel the task."
839 }
840 ]
841 }
842 ]
843 },
844 {
845 "name": "cancelCopy",
846 "description": "Cancels the running copy task.",
847 "parameters": [
848 {
849 "name": "copyId",
850 "type": "integer",
851 "description": "ID of the copy task to be cancelled."
852 },
853 {
854 "name": "callback",
855 "type": "function",
856 "optional": true,
857 "description": "Completion callback of the cancel.",
858 "parameters": []
859 }
860 ]
861 },
862 {
785 "name": "setLastModified", 863 "name": "setLastModified",
786 "description": "Updates last modified to specified time in seconds", 864 "description": "Updates last modified to specified time in seconds",
787 "parameters": [ 865 "parameters": [
788 { 866 {
789 "name": "fileUrl", 867 "name": "fileUrl",
790 "type": "string", 868 "type": "string",
791 "description": "File url from the local file system." 869 "description": "File url from the local file system."
792 }, 870 },
793 { 871 {
794 "name": "lastModified", 872 "name": "lastModified",
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 "description": "Fired when file transfers with remote file system are in progress.", 1219 "description": "Fired when file transfers with remote file system are in progress.",
1142 "parameters": [ 1220 "parameters": [
1143 { 1221 {
1144 "type": "array", 1222 "type": "array",
1145 "items": {"$ref": "FileTransferStatus"}, 1223 "items": {"$ref": "FileTransferStatus"},
1146 "name": "event", 1224 "name": "event",
1147 "description": "List of ongoing file statuses for ongoing transfer o perations." 1225 "description": "List of ongoing file statuses for ongoing transfer o perations."
1148 } 1226 }
1149 ] 1227 ]
1150 }, 1228 },
1229 // Here is an example of onCopyProgress:
1230 // Suppose a/b/c.txt (100bytes) and a/b/d.txt (200bytes), and trying to
1231 // copy a to x recursively. The events will be:
1232 //
1233 // BEGIN_ENTRY_COPY a
1234 // <create empty directory x/a>
1235 // END_ENTRY_COPY a
1236 //
1237 // BEGIN_ENTRY_COPY a/b
1238 // <create empty directory x/a/b>
1239 // END_ENTRY_COPY a/b
1240 //
1241 // BEGIN_ENTRY_COPY a/b/c.txt
1242 // PROGRESS a/b/c.txt 0
1243 // PROGRESS a/b/c.txt 10
1244 // :
1245 // PROGRESS a/b/c.txt 100
1246 // END_ENTRY_COPY a/b/c.txt
1247 //
1248 // BEGIN_ENTRY_COPY a/b/d.txt
1249 // PROGRESS a/b/d.txt 0
1250 // PROGRESS a/b/d.txt 10
1251 // :
1252 // PROGRESS a/b/d.txt 200
1253 // END_ENTRY_COPY a/b/d.txt
1254 //
1255 // SUCCESS x/a
1256 {
1257 "name": "onCopyProgress",
1258 "type": "function",
1259 "description": "Periodically fired during a copy task to report its prog ress update.",
1260 "parameters": [
1261 {
1262 "type": "integer",
1263 "name": "copyId",
1264 "description": "Id of the copy task of this progress update."
1265 },
1266 {
1267 "$ref": "CopyProgressStatus",
1268 "name": "status",
1269 "description": "Progress update status."
1270 }
1271 ]
1272 },
1151 { 1273 {
1152 "name": "onDirectoryChanged", 1274 "name": "onDirectoryChanged",
1153 "type": "function", 1275 "type": "function",
1154 "description": "Fired when watched file change event is detected in a wa tched directory.", 1276 "description": "Fired when watched file change event is detected in a wa tched directory.",
1155 "parameters": [ 1277 "parameters": [
1156 { 1278 {
1157 "$ref": "FileWatchEvent", 1279 "$ref": "FileWatchEvent",
1158 "name": "event", 1280 "name": "event",
1159 "description": "File watch event information." 1281 "description": "File watch event information."
1160 } 1282 }
1161 ] 1283 ]
1162 }, 1284 },
1163 { 1285 {
1164 "name": "onPreferencesChanged", 1286 "name": "onPreferencesChanged",
1165 "type": "function", 1287 "type": "function",
1166 "description": "Fired when file manager preferences change. The preferen ces can be retrieved via 'getPreferences'.", 1288 "description": "Fired when file manager preferences change. The preferen ces can be retrieved via 'getPreferences'.",
1167 "parameters": [] 1289 "parameters": []
1168 }, 1290 },
1169 { 1291 {
1170 "name": "onDriveConnectionStatusChanged", 1292 "name": "onDriveConnectionStatusChanged",
1171 "type": "function", 1293 "type": "function",
1172 "description": "Fired when the active network connection state changes. The network connection state can be retrieved via 'getDriveConnectionState'.", 1294 "description": "Fired when the active network connection state changes. The network connection state can be retrieved via 'getDriveConnectionState'.",
1173 "parameters": [] 1295 "parameters": []
1174 } 1296 }
1175 ] 1297 ]
1176 } 1298 }
1177 ] 1299 ]
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698