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

Unified 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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4c59e5eccf1994e254386ecce40eb59f23c058f1 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"],
+ "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."
+ },
+ "url": {
+ "type": "string",
+ "optional": true,
+ "description": "URL for the entry. Available only for BEGIN_ENTRY_COPY, END_ENTRY_COPY, PROGRESS and SUCCESS."
satorux1 2013/08/27 06:09:41 If a directory copy is initiated with startCopy(),
hidehiko 2013/08/27 06:32:18 Done.
+ },
+ "size": {
satorux1 2013/08/27 06:09:41 size -> num_bytes_copied ? see below
hidehiko 2013/08/27 06:32:18 Will address in the next cycle. Please see also my
+ "type": "number",
+ "optional": true,
+ "description": "Number of processed bytes for each entry copy. Available only for PROGRESS event."
satorux1 2013/08/27 06:09:41 What does this mean for a directory copy? I'm gues
hidehiko 2013/08/27 06:32:18 No, this won't be cumulative, but just num of copi
satorux1 2013/08/27 06:57:26 Ah this explains a lot.
+ },
+ "error": {
+ "type": "integer",
+ "optional": true,
+ "description": "Error code of the error. Available only for ERROR event."
satorux1 2013/08/27 06:09:41 What error code? Shouldn't we define enum codes fo
hidehiko 2013/08/27 06:32:18 Clarified it is FileError's code. (FileError is be
+ }
+ }
+ },
+ {
"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 called during a copy task to notify its progress update.",
satorux1 2013/08/27 06:09:41 events are not something "called". Maybe: "The ev
hidehiko 2013/08/27 06:32:18 I see. Then how about "fired" as other event's des
satorux1 2013/08/27 06:57:26 fired sgtm
+ "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.",
« 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