Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / api / file_browser_private.idl
index 1f84723..5efd19a 100644 (file)
@@ -39,7 +39,7 @@ enum MountCompletedStatus {
   error_mount_program_failed,
   error_invalid_device_path,
   error_unknown_filesystem,
-  error_unsuported_filesystem,
+  error_unsupported_filesystem,
   error_invalid_archive,
   error_authentication,
   error_path_unmounted
@@ -75,6 +75,9 @@ enum CopyProgressStatusType {
 // Specifies type of event that is raised.
 enum FileWatchEventType { changed, error };
 
+// Specifies type of change in file watch event.
+enum ChangeType { add_or_update, delete };
+
 // The type of entry that is needed. Default to ALL.
 enum SearchType { EXCLUDE_DIRECTORIES, SHARED_WITH_ME, OFFLINE, ALL };
 
@@ -298,6 +301,9 @@ dictionary MountCompletedEvent {
 
   // Whether it is remount or not.
   boolean isRemounting;
+
+  // Whether the volume should be opend by Files.app or not.
+  boolean shouldNotify;
 };
 
 // Payload data for file transfer status updates.
@@ -361,6 +367,15 @@ dictionary FileTransferCancelStatus {
   boolean canceled;
 };
 
+// Detailed information of change.
+dictionary FileChange {
+  // URL of changed file (or directory).
+  DOMString url;
+
+  // Type of change, which may be multiple.
+  ChangeType[] changes;
+};
+
 // Directory change notification details.
 dictionary FileWatchEvent {
   // Specifies type of event that is raised.
@@ -373,6 +388,10 @@ dictionary FileWatchEvent {
   // href='http://www.w3.org/TR/file-system-api/#the-entry-interface'>The Entry
   // interface</a>.
   [instanceOf=Entry] object entry;
+
+  // Detailed change information of change. It would be null if the detailed
+  // information is not available.
+  FileChange[]? changedFiles;
 };
 
 dictionary Preferences {
@@ -514,8 +533,8 @@ callback RequestAccessTokenCallback = void(DOMString accessToken);
 // |accessToken| OAuth2 access token, or an empty string if failed to fetch.
 callback RequestWebStoreAccessTokenCallback = void(DOMString accessToken);
 
-// |shareUrl| Share Url for the sharing dialog.
-callback GetShareUrlCallback = void(DOMString shareUrl);
+// |url| Result url.
+callback GetUrlCallback = void(DOMString url);
 
 // |profiles| List of profile information.
 // |runningProfile| ID of the profile that runs the application instance.
@@ -557,10 +576,8 @@ interface Functions {
 
   // Gets the list of tasks that can be performed over selected files.
   // |fileUrls| Array of selected file URLs
-  // |mimeTypes| Array of selected file MIME types
   // |callback|
   static void getFileTasks(DOMString[] fileUrls,
-                           DOMString[] mimeTypes,
                            GetFileTasksCallback callback);
 
   // Gets localized strings and initialization data.
@@ -752,7 +769,12 @@ interface Functions {
   // Requests a share dialog url for the specified file.
   // |url| Url for the file.
   // |callback|
-  static void getShareUrl(DOMString url, GetShareUrlCallback callback);
+  static void getShareUrl(DOMString url, GetUrlCallback callback);
+
+  // Requests a download url to download the file contents.
+  // |url| Url for the file.
+  // |callback|
+  static void getDownloadUrl(DOMString url, GetUrlCallback callback);
 
   // Requests to share drive files.
   // |url| URL of a file to be shared.
@@ -763,8 +785,10 @@ interface Functions {
 
   // Requests to install a webstore item.
   // |item_id| The id of the item to install.
+  // |silentInstallation| False to show installation prompt. True not to show.
   // |callback|
-  static void installWebstoreItem(DOMString item_id,
+  static void installWebstoreItem(DOMString itemId,
+                                  boolean silentInstallation,
                                   SimpleCallback callback);
 
   // Obtains a list of profiles that are logged-in.