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

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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 "description": "Approximated completed portion of the transfer opera tion." 315 "description": "Approximated completed portion of the transfer opera tion."
316 }, 316 },
317 "total": { 317 "total": {
318 "type": "number", 318 "type": "number",
319 "optional": true, 319 "optional": true,
320 "description": "Approximated total size of transfer operation." 320 "description": "Approximated total size of transfer operation."
321 } 321 }
322 } 322 }
323 }, 323 },
324 { 324 {
325 "id": "CopyProgressStatus",
326 "type": "object",
327 "description": "Payload data for copy status progress updates.",
328 "properties": {
329 "type": {
330 "type": "string",
331 "enum": ["begin_entry_copy", "end_entry_copy", "progress", "success" , "error"],
332 "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 operation. \"progress\" is fired periodically to report progress of a file copy (not directory). \"success\" is fired after all entries are copied. \"erro r\" is fired when an error occurs."
333 },
334 "url": {
335 "type": "string",
336 "optional": true,
337 "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."
338 },
339 "size": {
340 "type": "number",
341 "optional": true,
342 "description": "Number of processed bytes for the file currently bei ng copied. Available only for \"progress\" event. To show the progress bar, a ca ller needs to pre-compute the size of files being copied for the file (not direc tory)."
343 },
344 "error": {
345 "type": "integer",
346 "optional": true,
347 "description": "FileError's code of the error. Available only for ER ROR event."
348 }
349 }
350 },
351 {
325 "id": "FileTransferCancelStatus", 352 "id": "FileTransferCancelStatus",
326 "type": "object", 353 "type": "object",
327 "description": "Payload data for file transfer cancel response.", 354 "description": "Payload data for file transfer cancel response.",
328 "properties": { 355 "properties": {
329 "fileUrl": { 356 "fileUrl": {
330 "type": "string", 357 "type": "string",
331 "description": "URL of file that is being transfered." 358 "description": "URL of file that is being transfered."
332 }, 359 },
333 "canceled": { 360 "canceled": {
334 "type": "boolean", 361 "type": "boolean",
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 "name" : "fileTransferCancelStatuses", 814 "name" : "fileTransferCancelStatuses",
788 "type": "array", 815 "type": "array",
789 "items": {"$ref": "FileTransferCancelStatus"}, 816 "items": {"$ref": "FileTransferCancelStatus"},
790 "description": "The list of FileTransferCancelStatus." 817 "description": "The list of FileTransferCancelStatus."
791 } 818 }
792 ] 819 ]
793 } 820 }
794 ] 821 ]
795 }, 822 },
796 { 823 {
824 "name": "startCopy",
825 "description": "Starts to copy an entry. If the source is a directory, t he copy is done recursively.",
826 "parameters": [
827 {
828 "name": "sourceUrl",
829 "type": "string",
830 "description": "URL of the source entry to be copied."
831 },
832 {
833 "name": "parent",
834 "type": "string",
835 "description": "URL of the destination directory."
836 },
837 {
838 "name": "newName",
839 "type": "string",
840 "description": "Name of the new entry. It shouldn't contain '/'."
841 },
842 {
843 "name": "callback",
844 "type": "function",
845 "description": "Completion callback.",
846 "parameters": [
847 {
848 "name": "copyId",
849 "type": "integer",
850 "description": "ID of the copy task. Can be used to identify the progress, and to cancel the task."
851 }
852 ]
853 }
854 ]
855 },
856 {
857 "name": "cancelCopy",
858 "description": "Cancels the running copy task.",
859 "parameters": [
860 {
861 "name": "copyId",
862 "type": "integer",
863 "description": "ID of the copy task to be cancelled."
864 },
865 {
866 "name": "callback",
867 "type": "function",
868 "optional": true,
869 "description": "Completion callback of the cancel.",
870 "parameters": []
871 }
872 ]
873 },
874 {
797 "name": "setLastModified", 875 "name": "setLastModified",
798 "description": "Updates last modified to specified time in seconds", 876 "description": "Updates last modified to specified time in seconds",
799 "parameters": [ 877 "parameters": [
800 { 878 {
801 "name": "fileUrl", 879 "name": "fileUrl",
802 "type": "string", 880 "type": "string",
803 "description": "File url from the local file system." 881 "description": "File url from the local file system."
804 }, 882 },
805 { 883 {
806 "name": "lastModified", 884 "name": "lastModified",
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 "description": "Fired when file transfers with remote file system are in progress.", 1231 "description": "Fired when file transfers with remote file system are in progress.",
1154 "parameters": [ 1232 "parameters": [
1155 { 1233 {
1156 "type": "array", 1234 "type": "array",
1157 "items": {"$ref": "FileTransferStatus"}, 1235 "items": {"$ref": "FileTransferStatus"},
1158 "name": "event", 1236 "name": "event",
1159 "description": "List of ongoing file statuses for ongoing transfer o perations." 1237 "description": "List of ongoing file statuses for ongoing transfer o perations."
1160 } 1238 }
1161 ] 1239 ]
1162 }, 1240 },
1241 // Here is an example of onCopyProgress:
1242 // Suppose a/b/c.txt (100bytes) and a/b/d.txt (200bytes), and trying to
1243 // copy a to x recursively. The events will be:
1244 //
1245 // begin_entry_copy a
1246 // <create empty directory x/a>
1247 // end_entry_copy a
1248 //
1249 // begin_entry_copy a/b
1250 // <create empty directory x/a/b>
1251 // end_entry_copy a/b
1252 //
1253 // begin_entry_copy a/b/c.txt
1254 // progress a/b/c.txt 0
1255 // progress a/b/c.txt 10
1256 // :
1257 // progress a/b/c.txt 100
1258 // end_entry_copy a/b/c.txt
1259 //
1260 // begin_entry_copy a/b/d.txt
1261 // progress a/b/d.txt 0
1262 // progress a/b/d.txt 10
1263 // :
1264 // progress a/b/d.txt 200
1265 // end_entry_copy a/b/d.txt
1266 //
1267 // success x/a
1268 {
1269 "name": "onCopyProgress",
1270 "type": "function",
1271 "description": "Periodically fired during a copy task to report its prog ress update.",
1272 "parameters": [
1273 {
1274 "type": "integer",
1275 "name": "copyId",
1276 "description": "Id of the copy task of this progress update."
1277 },
1278 {
1279 "$ref": "CopyProgressStatus",
1280 "name": "status",
1281 "description": "Progress update status."
1282 }
1283 ]
1284 },
1163 { 1285 {
1164 "name": "onDirectoryChanged", 1286 "name": "onDirectoryChanged",
1165 "type": "function", 1287 "type": "function",
1166 "description": "Fired when watched file change event is detected in a wa tched directory.", 1288 "description": "Fired when watched file change event is detected in a wa tched directory.",
1167 "parameters": [ 1289 "parameters": [
1168 { 1290 {
1169 "$ref": "FileWatchEvent", 1291 "$ref": "FileWatchEvent",
1170 "name": "event", 1292 "name": "event",
1171 "description": "File watch event information." 1293 "description": "File watch event information."
1172 } 1294 }
1173 ] 1295 ]
1174 }, 1296 },
1175 { 1297 {
1176 "name": "onPreferencesChanged", 1298 "name": "onPreferencesChanged",
1177 "type": "function", 1299 "type": "function",
1178 "description": "Fired when file manager preferences change. The preferen ces can be retrieved via 'getPreferences'.", 1300 "description": "Fired when file manager preferences change. The preferen ces can be retrieved via 'getPreferences'.",
1179 "parameters": [] 1301 "parameters": []
1180 }, 1302 },
1181 { 1303 {
1182 "name": "onDriveConnectionStatusChanged", 1304 "name": "onDriveConnectionStatusChanged",
1183 "type": "function", 1305 "type": "function",
1184 "description": "Fired when the active network connection state changes. The network connection state can be retrieved via 'getDriveConnectionState'.", 1306 "description": "Fired when the active network connection state changes. The network connection state can be retrieved via 'getDriveConnectionState'.",
1185 "parameters": [] 1307 "parameters": []
1186 } 1308 }
1187 ] 1309 ]
1188 } 1310 }
1189 ] 1311 ]
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