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

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 "types": [ 9 "types": [
10 { 10 {
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 "description": "Approximated completed portion of the transfer opera tion." 336 "description": "Approximated completed portion of the transfer opera tion."
337 }, 337 },
338 "total": { 338 "total": {
339 "type": "number", 339 "type": "number",
340 "optional": true, 340 "optional": true,
341 "description": "Approximated total size of transfer operation." 341 "description": "Approximated total size of transfer operation."
342 } 342 }
343 } 343 }
344 }, 344 },
345 { 345 {
346 "id": "CopyProgressStatus",
347 "type": "object",
348 "description": "Payload data for copy status progress updates.",
349 "properties": {
350 "type": {
351 "type": "string",
352 "enum": ["BEGIN_ENTRY_COPY", "END_ENTRY_COPY", "PROGRESS", "SUCCESS" , "ERROR"],
353 "description": "The type of the progress event. BEGIN_ENTRY_COPY is fired for each entry before starting the copy operation, END_ENTRY_COPY is fired for each entry after ending the copy operation. PROGRESS is fired periodically during copy. SUCCESS is fired after all entries are copied. ERROR is fired when an error occurs."
satorux1 2013/08/29 08:32:32 Some clarification: BEGIN_ENTRY_COPY is fired for
hidehiko 2013/08/29 09:00:58 Done.
354 },
355 "url": {
356 "type": "string",
357 "optional": true,
358 "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."
359 },
360 "size": {
361 "type": "number",
362 "optional": true,
363 "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."
satorux1 2013/08/29 08:32:32 for the file (not directory) it's redundant but a
hidehiko 2013/08/29 09:00:58 Done.
364 },
365 "error": {
366 "type": "integer",
367 "optional": true,
368 "description": "FileError's code of the error. Available only for ER ROR event."
369 }
370 }
371 },
372 {
346 "id": "FileTransferCancelStatus", 373 "id": "FileTransferCancelStatus",
347 "type": "object", 374 "type": "object",
348 "description": "Payload data for file transfer cancel response.", 375 "description": "Payload data for file transfer cancel response.",
349 "properties": { 376 "properties": {
350 "fileUrl": { 377 "fileUrl": {
351 "type": "string", 378 "type": "string",
352 "description": "URL of file that is being transfered." 379 "description": "URL of file that is being transfered."
353 }, 380 },
354 "canceled": { 381 "canceled": {
355 "type": "boolean", 382 "type": "boolean",
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 "name" : "fileTransferCancelStatuses", 857 "name" : "fileTransferCancelStatuses",
831 "type": "array", 858 "type": "array",
832 "items": {"$ref": "FileTransferCancelStatus"}, 859 "items": {"$ref": "FileTransferCancelStatus"},
833 "description": "The list of FileTransferCancelStatus." 860 "description": "The list of FileTransferCancelStatus."
834 } 861 }
835 ] 862 ]
836 } 863 }
837 ] 864 ]
838 }, 865 },
839 { 866 {
867 "name": "startCopy",
868 "description": "Starts to copy an entry. If the source is directory, the copy is done recursively.",
satorux1 2013/08/29 08:32:32 Starts to copy an entry to another directory
hidehiko 2013/08/29 09:00:58 The destination directory can be same. E.g. copy t
869 "parameters": [
870 {
871 "name": "sourceUrl",
872 "type": "string",
873 "description": "URL of the source entry to be copied."
874 },
875 {
876 "name": "targetUrl",
877 "type": "string",
878 "description": "URL of the destination location."
satorux1 2013/08/29 08:32:32 URL of the destination directory. (to make it cle
hidehiko 2013/08/29 09:00:58 Per offline discussion, I split the url into two;
879 },
880 {
881 "name": "callback",
882 "type": "function",
883 "description": "Completion callback.",
884 "parameters": [
885 {
886 "name": "copyId",
887 "type": "integer",
888 "description": "ID of the copy task. Can be used to identify the progress, and to cancel the task."
889 }
890 ]
891 }
892 ]
893 },
894 {
895 "name": "cancelCopy",
896 "description": "Cancels the running copy task.",
897 "parameters": [
898 {
899 "name": "copyId",
900 "type": "integer",
901 "description": "ID of the copy task to be cancelled."
satorux1 2013/08/29 08:32:32 I thought it's canceled but cancelled seems to be
hidehiko 2013/08/29 09:00:58 IIRC, cancelled for UK and canceled for US. I actu
902 },
903 {
904 "name": "callback",
905 "type": "function",
906 "optional": true,
907 "description": "Completion callback of the cancel.",
908 "parameters": []
909 }
910 ]
911 },
912 {
840 "name": "setLastModified", 913 "name": "setLastModified",
841 "description": "Updates last modified to specified time in seconds", 914 "description": "Updates last modified to specified time in seconds",
842 "parameters": [ 915 "parameters": [
843 { 916 {
844 "name": "fileUrl", 917 "name": "fileUrl",
845 "type": "string", 918 "type": "string",
846 "description": "File url from the local file system." 919 "description": "File url from the local file system."
847 }, 920 },
848 { 921 {
849 "name": "lastModified", 922 "name": "lastModified",
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 "description": "Fired when file transfers with remote file system are in progress.", 1267 "description": "Fired when file transfers with remote file system are in progress.",
1195 "parameters": [ 1268 "parameters": [
1196 { 1269 {
1197 "type": "array", 1270 "type": "array",
1198 "items": {"$ref": "FileTransferStatus"}, 1271 "items": {"$ref": "FileTransferStatus"},
1199 "name": "event", 1272 "name": "event",
1200 "description": "List of ongoing file statuses for ongoing transfer o perations." 1273 "description": "List of ongoing file statuses for ongoing transfer o perations."
1201 } 1274 }
1202 ] 1275 ]
1203 }, 1276 },
1277 // Here is an example of onCopyProgress:
1278 // Suppose a/b/c.txt (100bytes) and a/b/d.txt (200bytes), and trying to
1279 // copy a/ to x/ recursively. The events will be:
satorux1 2013/08/29 08:32:32 remoe the trailing /? to be precise, the trailing
hidehiko 2013/08/29 09:00:58 Done.
1280 // BEGIN_ENTRY_COPY a/
1281 // <create empty directory x/a/>
1282 // END_ENTRY_COPY a/
satorux1 2013/08/29 08:32:32 add a blank line between each entry?
hidehiko 2013/08/29 09:00:58 Done.
1283 // BEGIN_ENTRY_COPY a/b/
1284 // <create empty directory x/a/b/>
1285 // END_ENTRY_COPY a/b/
1286 // BEGIN_ENTRY_COPY a/b/c.txt
1287 // PROGRESS a/b/c.txt 0
1288 // PROGRESS a/b/c.txt 10
1289 // :
1290 // PROGRESS a/b/c.txt 100
1291 // END_ENTRY_COPY a/b/c.txt
1292 // BEGIN_ENTRY_COPY a/b/d.txt
1293 // PROGRESS a/b/d.txt 0
1294 // PROGRESS a/b/d.txt 10
1295 // :
1296 // PROGRESS a/b/d.txt 200
1297 // END_ENTRY_COPY a/b/d.txt
1298 // SUCCESS x/a/
1299 {
1300 "name": "onCopyProgress",
1301 "type": "function",
1302 "description": "Periodically fired during a copy task to report its prog ress update.",
1303 "parameters": [
1304 {
1305 "type": "integer",
1306 "name": "copyId",
1307 "description": "Id of the copy task of this progress update."
1308 },
1309 {
1310 "$ref": "CopyProgressStatus",
1311 "name": "status",
1312 "description": "Progress update status."
1313 }
1314 ]
1315 },
1204 { 1316 {
1205 "name": "onDirectoryChanged", 1317 "name": "onDirectoryChanged",
1206 "type": "function", 1318 "type": "function",
1207 "description": "Fired when watched file change event is detected in a wa tched directory.", 1319 "description": "Fired when watched file change event is detected in a wa tched directory.",
1208 "parameters": [ 1320 "parameters": [
1209 { 1321 {
1210 "$ref": "FileWatchEvent", 1322 "$ref": "FileWatchEvent",
1211 "name": "event", 1323 "name": "event",
1212 "description": "File watch event information." 1324 "description": "File watch event information."
1213 } 1325 }
1214 ] 1326 ]
1215 }, 1327 },
1216 { 1328 {
1217 "name": "onPreferencesChanged", 1329 "name": "onPreferencesChanged",
1218 "type": "function", 1330 "type": "function",
1219 "description": "Fired when file manager preferences change. The preferen ces can be retrieved via 'getPreferences'.", 1331 "description": "Fired when file manager preferences change. The preferen ces can be retrieved via 'getPreferences'.",
1220 "parameters": [] 1332 "parameters": []
1221 }, 1333 },
1222 { 1334 {
1223 "name": "onDriveConnectionStatusChanged", 1335 "name": "onDriveConnectionStatusChanged",
1224 "type": "function", 1336 "type": "function",
1225 "description": "Fired when the active network connection state changes. The network connection state can be retrieved via 'getDriveConnectionState'.", 1337 "description": "Fired when the active network connection state changes. The network connection state can be retrieved via 'getDriveConnectionState'.",
1226 "parameters": [] 1338 "parameters": []
1227 } 1339 }
1228 ] 1340 ]
1229 } 1341 }
1230 ] 1342 ]
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