Index: chrome/common/extensions/api/file_browser_private.json |
diff --git a/chrome/common/extensions/api/file_browser_private.json b/chrome/common/extensions/api/file_browser_private.json |
index 98fb729224ec85660984670e94cf192f1b20e66a..85811b952eeea21bde0c1056f7e74485fdc7b412 100644 |
--- a/chrome/common/extensions/api/file_browser_private.json |
+++ b/chrome/common/extensions/api/file_browser_private.json |
@@ -343,6 +343,33 @@ |
} |
}, |
{ |
+ "id": "CopyProgressStatus", |
+ "type": "object", |
+ "description": "Payload data for copy status progress updates.", |
+ "properties": { |
+ "type": { |
+ "type": "string", |
+ "enum": ["BEGIN_ENTRY_COPY", "END_ENTRY_COPY", "PROGRESS", "SUCCESS", "ERROR"], |
satorux1
2013/08/27 06:57:26
Why BEGIN_ENTRY_COPY instead of BEGIN_FILE_COPY? I
hidehiko
2013/08/27 07:52:07
Yes, {BEGIN_END}_ENTRY_COPY are fired not only for
|
+ "description": "The type of the progress event. BEGIN_ENTRY_COPY is called before for each entry copy, END_ENTRY_COPY is called after for each entry copy. PROGRESS is called periodically during copy. SUCCESS is called after all copy is completed. ERROR is called when an error is found." |
satorux1
2013/08/27 06:57:26
nits:
s/called/fired/ as this is an event.
"BEGI
hidehiko
2013/08/27 07:52:07
Done.
|
+ }, |
+ "url": { |
+ "type": "string", |
+ "optional": true, |
+ "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 in that directory is now being copied." |
+ }, |
+ "size": { |
+ "type": "number", |
+ "optional": true, |
+ "description": "Number of processed bytes for each entry copy. 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/27 06:57:26
Maybe:
Number of processed bytes for each entry co
hidehiko
2013/08/27 07:52:07
Done.
|
+ }, |
+ "error": { |
+ "type": "integer", |
+ "optional": true, |
+ "description": "FileError's code of the error. Available only for ERROR event." |
+ } |
+ } |
+ }, |
+ { |
"id": "FileTransferCancelStatus", |
"type": "object", |
"description": "Payload data for file transfer cancel response.", |
@@ -837,6 +864,52 @@ |
] |
}, |
{ |
+ "name": "startCopy", |
+ "description": "Starts to copy an entry. If the source is directory, the copy is done recursively.", |
+ "parameters": [ |
+ { |
+ "name": "sourceUrl", |
+ "type": "string", |
+ "description": "URL of the source entry to be copied." |
+ }, |
+ { |
+ "name": "targetUrl", |
+ "type": "string", |
+ "description": "URL of the destination location." |
+ }, |
+ { |
+ "name": "callback", |
+ "type": "function", |
+ "description": "Completion callback.", |
+ "parameters": [ |
+ { |
+ "name": "copyId", |
+ "type": "integer", |
+ "description": "ID of the copy task. Can be used to identify the progress, and to cancel the task." |
+ } |
+ ] |
+ } |
+ ] |
+ }, |
+ { |
+ "name": "cancelCopy", |
+ "description": "Cancels the running copy task.", |
+ "parameters": [ |
+ { |
+ "name": "copyId", |
+ "type": "integer", |
+ "description": "ID of the copy task to be cancelled." |
+ }, |
+ { |
+ "name": "callback", |
+ "type": "function", |
+ "optional": true, |
+ "description": "Completion callback of the cancel.", |
+ "parameters": [] |
+ } |
+ ] |
+ }, |
+ { |
"name": "setLastModified", |
"description": "Updates last modified to specified time in seconds", |
"parameters": [ |
@@ -1202,6 +1275,23 @@ |
] |
}, |
{ |
+ "name": "onCopyProgress", |
+ "type": "function", |
+ "description": "Periodically fired during a copy task to report its progress update.", |
+ "parameters": [ |
+ { |
+ "type": "integer", |
+ "name": "copyId", |
+ "description": "Id of the copy task of this progress update." |
+ }, |
+ { |
+ "$ref": "CopyProgressStatus", |
+ "name": "status", |
+ "description": "Progress update status." |
+ } |
+ ] |
+ }, |
+ { |
"name": "onDirectoryChanged", |
"type": "function", |
"description": "Fired when watched file change event is detected in a watched directory.", |