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

Unified Diff: chrome/common/extensions/api/fileBrowserPrivate.json

Issue 9720020: [COPY] - Implemented API for tracking ongoing file transfers from file manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | « chrome/browser/resources/file_manager/js/directory_model.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/fileBrowserPrivate.json
===================================================================
--- chrome/common/extensions/api/fileBrowserPrivate.json (revision 127341)
+++ chrome/common/extensions/api/fileBrowserPrivate.json (working copy)
@@ -259,6 +259,37 @@
}
},
{
+ "id": "FileTransferStatus",
+ "type": "object",
+ "description": "Payload data for file transfer status updates.",
+ "properties": {
+ "fileUrl": {
+ "type": "string",
+ "description": "URL of file that is being transfered."
+ },
+ "transferState": {
+ "type": "string",
+ "enum": ["started", "in_progress", "completed", "failed"],
+ "description": "File transfer progress state."
+ },
+ "transferType": {
+ "type": "string",
+ "enum": ["upload", "download"],
+ "description": "Defines file transfer direction."
+ },
+ "processed": {
+ "type": "integer",
+ "optional": true,
+ "description": "Completed portion of the transfer operation."
+ },
+ "total": {
+ "type": "integer",
+ "optional": true,
+ "description": "Total size (cost) of transfer operation."
+ }
+ }
+ },
+ {
"id": "FileWatchEvent",
"type": "object",
"description": "Payload data for disk mount / unmount event.",
@@ -652,6 +683,24 @@
]
},
{
+ "name": "getFileTransfers",
+ "description": "Get the list of ongoing file transfer operations.",
+ "parameters": [
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": [
+ {
+ "name" : "fileTransfers",
+ "type": "array",
+ "items": {"$ref": "FileTransferStatus"},
+ "description": "The list of FileTransferStatus representing ongoing file transfers."
+ }
+ ]
+ }
+ ]
+ },
+ {
"name": "getSizeStats",
"description": "Retrieves total and remaining size of a mount point.",
"parameters": [
@@ -733,6 +782,19 @@
]
},
{
+ "name": "onFileTransfersUpdated",
+ "type": "function",
+ "description": "Fired when file transfers with remote file system are in progress.",
+ "parameters": [
+ {
+ "type": "array",
+ "items": {"$ref": "FileTransferStatus"},
+ "name": "event",
+ "description": "List of ongoing file statuses for ongoing transfer operations."
+ }
+ ]
+ },
+ {
"name": "onFileChanged",
"type": "function",
"description": "Fired when watched file change event is detected.",
« no previous file with comments | « chrome/browser/resources/file_manager/js/directory_model.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698