1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // fileManagerPrivate API.
6 // This is a private API used by the file browser of ChromeOS.
7 [platforms
=("chromeos"),
8 implemented_in
="chrome/browser/chromeos/extensions/file_manager/file_manager_private_api_functions.h"]
9 namespace fileManagerPrivate
{
10 // Type of the mounted volume.
11 enum VolumeType
{ drive
, downloads
, removable
, archive
, provided
, mtp
,
14 // Device type. Available if this is removable volume.
15 enum DeviceType
{ usb
, sd
, optical
, mobile
, unknown
};
17 // Additional data about mount, for example, that the filesystem is not
19 enum MountCondition
{ unknown
, unsupported
};
21 // Additional information of the context the volume was mounted.
22 enum MountContext
{ user
, auto };
24 // Is the event raised for mounting or unmounting.
25 enum MountCompletedEventType
{ mount
, unmount
};
27 // Event type that tells listeners if mount was successful or an error
28 // occurred. It also specifies the error.
29 enum MountCompletedStatus
{
33 error_invalid_argument
,
35 error_path_already_mounted
,
36 error_path_not_mounted
,
37 error_directory_creation_failed
,
38 error_invalid_mount_options
,
39 error_invalid_unmount_options
,
40 error_insufficient_permissions
,
41 error_mount_program_not_found
,
42 error_mount_program_failed
,
43 error_invalid_device_path
,
44 error_unknown_filesystem
,
45 error_unsupported_filesystem
,
46 error_invalid_archive
,
51 // File transfer progress state.
52 enum TransferState
{ in_progress
, completed
, failed
};
54 // Defines file transfer direction.
55 enum TransferType
{ upload
, download
};
57 // The type of the progress event.
58 enum CopyProgressStatusType
{
59 // "begin_copy_entry" is fired for each entry (file or directory) before
60 // starting the copy operation.
63 // "end_copy_entry" is fired for each entry (file or directory) after ending
64 // the copy operation.
67 // "progress" is fired periodically to report progress of a file copy (not
71 // "success" is fired after all entries are copied.
74 // "error" is fired when an error occurs.
78 // Specifies type of event that is raised.
79 enum FileWatchEventType
{ changed
, error
};
81 // Specifies type of change in file watch event.
82 enum ChangeType
{ add_or_update
, delete
};
84 // The type of entry that is needed. Default to ALL.
85 enum SearchType
{ EXCLUDE_DIRECTORIES
, SHARED_WITH_ME
, OFFLINE
, ALL
};
88 enum ZoomOperationType
{ in, out, reset
};
90 // Specifies how to open inspector.
92 // Open inspector for foreground page.
94 // Open inspector for foreground page and bring focus to the console.
96 // Open inspector for foreground page in inspect element mode.
98 // Open inspector for background page.
102 // Device event type.
103 enum DeviceEventType
{
104 // If the device is disabled by preference.
106 // Device is removed.
108 // Device is hard unplugged.
118 // Drive sync error type.
119 // Keep it synced with DriveSyncErrorType in operation_observer.h.
120 enum DriveSyncErrorType
{
121 // Request to delete a file without permission.
122 delete_without_permission
,
123 // Google Drive is temporarily unavailable.
125 // Miscellaneous errors other than listed above.
129 // Result of task execution.
131 // The task execution succeeded and a new window/tab was opened.
133 // The task execution succeeded and the message was sent to the proper
136 // The task execution failed.
138 // No URL is specified.
143 enum DriveShareType
{
149 // Names of properies for getEntryProperties().
150 enum EntryPropertyName
{
162 availableWhenMetered
,
171 // Entry property visibility for setEntryTag();
172 enum EntryTagVisibility
{
177 // Source of the volume data.
185 // A file task represents an action that the file manager can perform over the
186 // currently selected files. See
187 // chrome/browser/chromeos/extensions/file_manager/file_tasks.h for details
188 // about how file tasks are handled.
189 dictionary FileTask
{
190 // The unique identifier of the task.
193 // Task title (ex. App name).
196 // Task icon url (from chrome://extension-icon/...)
199 // True if this task is a default task for the selected files.
202 // True if this task is from generic file handler. Generic file handler is a
203 // file handler which handles any type of files (e.g. extensions: ["*"],
204 // types: ["*/*"]). Partial wild card (e.g. types: ["image/*"]) is not
205 // generic file handler.
206 boolean isGenericFileHandler
;
209 // Additional entry properties.
210 dictionary EntryProperties
{
211 // Size of this file.
214 // Timestamp of entry update time, in milliseconds past the epoch.
215 double? modificationTime
;
217 // URL to the Drive thumbnail image for this file.
218 DOMString? thumbnailUrl
;
220 // URL to the Drive cropped thumbnail image for this file.
221 DOMString? croppedThumbnailUrl
;
223 // Width, if the entry is an image.
226 // Height, if the entry is an image.
229 // Rotation in clockwise degrees, if the entry is an image.
232 // True if the file is pinned in cache.
235 // True if the file is present in cache.
238 // True if the file is hosted on a server instead of local.
241 // True if the file is available offline.
242 boolean? availableOffline
;
244 // True if the file is available on metered connection.
245 boolean? availableWhenMetered
;
247 // True if the file has local change (has not been fully synced to the cloud).
250 // URL to the custom icon for this file.
251 DOMString? customIconUrl
;
253 // Drive MIME type for this file.
254 DOMString? contentMimeType
;
256 // True if the entry is labeled as shared-with-me.
257 boolean? sharedWithMe
;
259 // True if the entry is labeled as shared (either from me to others or to me
263 // External file URL to open the file in browser.
264 DOMString? externalFileUrl
;
267 // Information about total and remaining size on the mount point.
268 dictionary MountPointSizeStats
{
269 // Approximate total available size on the mount point.
272 // Approximate remaining available size on the mount point.
273 double remainingSize
;
276 // Information about a profile.
277 dictionary ProfileInfo
{
278 // Profile ID. This is currently e-mail address of the profile.
281 // The name of the profile for display purpose.
282 DOMString displayName
;
284 // True if the profile is the one running the current file manager instance.
285 // TODO(hirono): Remove the property because of the design change of
286 // multi-profile suuport.
287 boolean isCurrentProfile
;
290 // Mounted disk volume metadata.
291 dictionary VolumeMetadata
{
292 // ID of the disk volume.
295 // Id the provided file system (for provided file systems).
296 DOMString? fileSystemId
;
298 // Extension providing this volume (for provided file systems).
299 DOMString? extensionId
;
301 // Source of the volume's data.
304 // Label of the volume (if available).
305 DOMString? volumeLabel
;
307 // Description of the profile where the volume belongs.
308 // TODO(hirono): Remove the property because of the design change of
309 // multi-profile support.
312 // The path to the mounted device, archive file or network resource.
313 DOMString? sourcePath
;
315 // Type of the mounted volume.
316 VolumeType volumeType
;
318 // Device type. Available if this is removable volume.
319 DeviceType? deviceType
;
321 // Path to identify the device. This is consistent with DeviceEvent's
323 DOMString? devicePath
;
325 // Whether the device is parent or not (i.e. sdb rather than sdb1).
326 boolean? isParentDevice
;
328 // Flag that specifies if volume is mounted in read-only mode.
331 // Flag that specifies whether the volume contains media.
334 // Flag that specifies whether the volume is configurable.
335 boolean configurable
;
337 // Flag that specifies whether the volume is watchable.
340 // Additional data about mount, for example, that the filesystem is not
342 MountCondition? mountCondition
;
344 // Context in which the volume has been mounted.
345 MountContext? mountContext
;
348 // Payload data for mount event.
349 dictionary MountCompletedEvent
{
350 // Is the event raised for mounting or unmounting.
351 MountCompletedEventType eventType
;
353 // Event type that tells listeners if mount was successful or an error
354 // occurred. It also specifies the error.
355 MountCompletedStatus status
;
357 // Metadata of the mounted volume.
358 VolumeMetadata volumeMetadata
;
360 // Whether the volume event should be notified or not.
361 boolean shouldNotify
;
364 // Payload data for file transfer status updates.
365 dictionary FileTransferStatus
{
366 // URL of file that is being transfered.
369 // File transfer progress state.
370 TransferState transferState
;
372 // Defines file transfer direction.
373 TransferType transferType
;
375 // Approximated completed portion of the transfer operation.
378 // Approximated total size of transfer operation.
381 // Total number of jobs.
385 // Error during the drive sync.
386 dictionary DriveSyncErrorEvent
{
388 DriveSyncErrorType type
;
390 // File URL of the entry that the error happens to.
394 // Payload data for copy status progress updates.
395 dictionary CopyProgressStatus
{
396 // The type of the progress event.
397 CopyProgressStatusType type
;
399 // URL for the entry currently being copied. This field is particularly useful
400 // when a directory copy is initiated with startCopy(). The field tells what
401 // file/directory in that directory is now being copied.
402 DOMString? sourceUrl
;
404 // URL for the entry currently being created. This field is particularly
405 // useful when a directory copy is initiated with startCopy(). The field tells
406 // what file/directory in that directory is being created. Available only for
407 // end_copy_entry and success.
408 DOMString? destinationUrl
;
410 // Number of processed bytes for the file currently being copied. Available
411 // only for "progress" event. To show the progress bar, a caller needs to
412 // pre-compute the size of files being copied for the file (not directory).
415 // DOMError's name. Available only for ERROR event.
419 // Detailed information of change.
420 dictionary FileChange
{
421 // URL of changed file (or directory).
424 // Type of change, which may be multiple.
425 ChangeType
[] changes
;
428 // Directory change notification details.
429 dictionary FileWatchEvent
{
430 // Specifies type of event that is raised.
431 FileWatchEventType eventType
;
433 // An Entry object which represents a changed directory. The conversion into a
434 // kind of FileEntry object is done in
435 // file_browser_handler_custom_bindings.cc. For filesystem API's Entry
437 // href='http://www.w3.org/TR/file-system-api/#the-entry-interface'>The Entry
439 [instanceOf
=Entry] object entry;
441 // Detailed change information of change. It would be null if the detailed
442 // information is not available.
443 FileChange
[]? changedFiles
;
446 dictionary Preferences
{
447 boolean driveEnabled
;
448 boolean cellularDisabled
;
449 boolean hostedFilesDisabled
;
450 boolean searchSuggestEnabled
;
451 boolean use24hourClock
;
452 boolean allowRedeemOffers
;
455 dictionary PreferencesChange
{
456 boolean? cellularDisabled
;
457 boolean? hostedFilesDisabled
;
460 dictionary SearchParams
{
464 // ID of the search feed that should be fetched next. Value passed here should
465 // be gotten from previous searchDrive call. It can be empty for the initial
470 dictionary SearchMetadataParams
{
471 // Search query. It can be empty. Any filename matches to an empty query.
474 // The type of entry that is needed. Default to ALL.
477 // Maximum number of results.
481 // Entry and Drive-related properties representing a search result.
482 dictionary SearchResult
{
483 // A dictionary object which represents a Drive file. This will be converted
484 // into a kind of FileEntry object. See
485 // file_browser_handler_custom_bindings.cc for details. For filesystem API's
486 // Entry interface, see <a
487 // href='http://www.w3.org/TR/file-system-api/#the-entry-interface'>The Entry
489 [instanceOf
=Entry] object entry;
491 // The base name of a Drive file that matched the search query. The matched
492 // sub strings are highlighted with <b> element. Meta characters are escaped
494 DOMString highlightedBaseName
;
497 dictionary DriveConnectionState
{
500 // Reasons of offline.
503 // Whether the device has a cellular network access or not. i.e. the |type|
504 // can be 'metered' or not.
505 boolean hasCellularNetworkAccess
;
508 // Device event dispatched to listeners of onDeviceChaged. See also
509 // DeviceEventType to know when the event dispatched.
510 dictionary DeviceEvent
{
511 // Event type of the device event.
512 DeviceEventType type
;
513 // Device path to identify the device.
514 DOMString devicePath
;
517 // Describes an installed providing extension.
518 dictionary ProvidingExtension
{
519 // ID of the providing extension.
520 DOMString extensionId
;
522 // Name of the providing extension.
525 // Whether supports configuration dialog.
526 boolean configurable
;
528 // Whether supports watching entries.
531 // Whether supports mounting multiple instances.
532 boolean multipleMounts
;
534 // Source of file systems' data.
535 manifestTypes.FileSystemProviderSource
source;
538 // Callback that does not take arguments.
539 callback SimpleCallback
= void();
541 // |result| Boolean result returned by the invoked function.
542 callback BooleanCallback
= void(boolean result
);
544 // |result| Result of the task execution.
545 callback ExecuteTaskCallback
= void(TaskResult result
);
547 // |tasks| The list of matched file entries for this task.
548 callback GetFileTasksCallback
= void(FileTask
[] tasks
);
550 // |result| Mime type of the file.
551 callback GetMimeTypeCallback
= void(DOMString result
);
553 // |result| Hash containing the string assets.
554 callback GetStringsCallback
= void(object result
);
556 // |success| True when file watch is successfully added.
557 callback AddFileWatchCallback
= void(optional boolean success
);
559 // |success| True when file watch is successfully removed.
560 callback RemoveFileWatchCallback
= void(optional boolean success
);
562 // |entryProperties| A dictionary containing properties of the requested
564 callback GetEntryPropertiesCallback
=
565 void(EntryProperties
[] entryProperties
);
567 // |sourcePath| Source path of the mount.
568 callback AddMountCallback
= void(DOMString sourcePath
);
570 // |volumeMetadataList| The list of VolumeMetadata representing mounted volumes.
571 callback GetVolumeMetadataListCallback
=
572 void(VolumeMetadata
[] volumeMetadataList
);
574 // |fileTransferCancelStatuses| The list of FileTransferCancelStatus.
575 callback CancelFileTransfersCallback
=
576 void(FileTransferCancelStatus
[] fileTransferCancelStatuses
);
578 // |copyId| ID of the copy task. Can be used to identify the progress, and to
580 callback StartCopyCallback
= void(long copyId
);
582 // |sizeStats| Name/value pairs of size stats. Will be undefined if stats could
583 // not be determined.
584 callback GetSizeStatsCallback
= void(optional MountPointSizeStats sizeStats
);
586 callback GetPreferencesCallback
= void(Preferences result
);
589 // |nextFeed| ID of the feed that contains next chunk of the search result.
590 // Should be sent to the next searchDrive request to perform
591 // incremental search.
592 callback SearchDriveCallback
=
593 void([instanceOf
=Entry] object[] entries
, DOMString nextFeed
);
595 callback SearchDriveMetadataCallback
= void(SearchResult
[] results
);
597 // |urls| The map of hash and array of FileEntry's URL. The array can be empty
598 // if the corresponding file is not found.
599 callback SearchFilesByHashesCallback
= void(object urls
);
601 callback ZipSelectionCallback
= void(optional boolean success
);
603 callback GetDriveConnectionStateCallback
= void(DriveConnectionState result
);
605 // |result| true if the length is in the valid range, false otherwise.
606 callback ValidatePathNameLengthCallback
= void(boolean result
);
608 // |accessToken| OAuth2 access token, or an empty string if failed to fetch.
609 callback RequestAccessTokenCallback
= void(DOMString accessToken
);
611 // |accessToken| OAuth2 access token, or an empty string if failed to fetch.
612 callback RequestWebStoreAccessTokenCallback
= void(DOMString accessToken
);
615 callback GetUrlCallback
= void(DOMString url
);
617 // |profiles| List of profile information.
618 // |runningProfile| ID of the profile that runs the application instance.
619 // |showingProfile| ID of the profile that shows the application window.
620 callback GetProfilesCallback
= void(ProfileInfo
[] profiles
,
621 DOMString runningProfile
,
622 DOMString displayProfile
);
624 // |entries| External entries.
625 callback ResolveEntriesCallback
=
626 void([instanceOf
=Entry] object[] entries
);
628 // |checksum| Result checksum.
629 callback ComputeChecksumCallback
= void(DOMString checksum
);
631 // |extensions| List of providing extensions.
632 callback GetProvidingExtensionsCallback
= void(ProvidingExtension
[] extensions
);
634 // |actions| List of actions.
635 callback GetEntryActionsCallback
= void(fileSystemProvider.Action
[] actions
);
637 interface Functions
{
638 // Logout the current user for navigating to the re-authentication screen for
639 // the Google account.
640 static
void logoutUserForReauthentication
();
642 // Cancels file selection.
643 static
void cancelDialog
();
645 // Executes file browser task over selected files.
646 // |taskId| The unique identifier of task to execute.
647 // |entries| Array of entries
650 static
void executeTask
(DOMString taskId
,
651 [instanceof
=Entry] object[] entries
,
652 ExecuteTaskCallback
callback);
654 // Sets the default task for the supplied MIME types and path extensions.
655 // Lists of MIME types and URLs may contain duplicates. Additionally, the
656 // list of MIME types can be empty.
657 // |taskId| The unique identifier of task to mark as default.
658 // |entries| Array of selected entries to extract path extensions from.
659 // |mimeTypes| Array of selected file MIME types.
662 static
void setDefaultTask
(DOMString taskId
,
663 [instanceof
=Entry] object[] entries
,
664 DOMString
[] mimeTypes
,
665 SimpleCallback
callback);
667 // Gets the list of tasks that can be performed over selected files.
668 // |entries| Array of selected entries
671 static
void getFileTasks
([instanceof
=Entry] object[] entries
,
672 GetFileTasksCallback
callback);
674 // Gets the MIME type of a file.
675 // |entry| Entry to be checked.
678 static
void getMimeType
([instanceof
=Entry] object entry,
679 GetMimeTypeCallback
callback);
681 // Gets localized strings and initialization data.
683 static
void getStrings
(GetStringsCallback
callback);
686 // |entry| Entry to watch
689 static
void addFileWatch
([instanceof
=Entry] object entry,
690 AddFileWatchCallback
callback);
692 // Removes file watch.
693 // |entry| Watched entry
696 static
void removeFileWatch
([instanceof
=Entry] object entry,
697 RemoveFileWatchCallback
callback);
699 // Enables the extenal file scheme necessary to initiate drags to the browser
700 // window for files on the external backend.
701 static
void enableExternalFileScheme
();
703 // Requests granting R/W permissions for the passed entries. It's a best
704 // effort operation. Some files may not be granted access if the url is
705 // invalid or not backed by the external file system.
706 // |entryUrls| Urls for the entries to be accessed.
708 static
void grantAccess
(DOMString
[] entryUrls
, SimpleCallback
callback);
710 // Selects multiple files.
711 // |selectedPaths| Array of selected paths
712 // |shouldReturnLocalPath| true if paths need to be resolved to local paths.
714 static
void selectFiles
(DOMString
[] selectedPaths
,
715 boolean shouldReturnLocalPath
,
716 SimpleCallback
callback);
719 // |selectedPath| A selected path
720 // |index| Index of Filter
721 // |forOpening| true if paths are selected for opening. false if for saving.
722 // |shouldReturnLocalPath| true if paths need to be resolved to local paths.
724 static
void selectFile
(DOMString selectedPath
,
727 boolean shouldReturnLocalPath
,
728 SimpleCallback
callback);
730 // Requests additional properties for files.
731 // |entries| list of entries
732 // |names| list of requested properties by their names.
733 // |callback| Completion callback. May return less than requested properties
734 // if some are not available. In the same time, it can return properties
735 // which were not requested (if it's cheap to compute them).
737 static
void getEntryProperties
(
738 [instanceOf
=Entry] object[] entries
,
739 EntryPropertyName
[] names
,
740 GetEntryPropertiesCallback
callback);
742 // Pins/unpins a Drive file in the cache.
743 // |entry| Entry to pin/unpin.
744 // |pin| Pass true to pin the file.
745 // |callback| Completion callback. $(ref:runtime.lastError) will be set if
746 // there was an error.
748 static
void pinDriveFile
([instanceof
=Entry] object entry,
750 SimpleCallback
callback);
752 // Resolves entries in the isolated file system and returns corresponding
753 // entries in the external file system mounted to Chrome OS file manager
754 // backend. If resolving entry fails, the entry will be just ignored and the
755 // corresponding entry does not appear in the result.
757 static
void resolveIsolatedEntries
(
758 [instanceOf
=Entry] object[] entries
,
759 ResolveEntriesCallback
callback);
761 // Mount a resource or a file.
762 // |source| Mount point source. For compressed files it is relative file path
763 // within external file system
765 static
void addMount
(DOMString
source, AddMountCallback
callback);
767 // Unmounts a mounted resource.
768 // |volumeId| An ID of the volume.
769 static
void removeMount
(DOMString volumeId
);
771 // Get the list of mounted volumes.
773 static
void getVolumeMetadataList
(GetVolumeMetadataListCallback
callback);
775 // Cancels ongoing file transfers for selected files.
776 // |entries| Array of files for which ongoing transfer should be canceled.
777 // |callback| Completion callback of the cancel.
779 static
void cancelFileTransfers
([instanceof
=Entry] object[] entries
,
780 SimpleCallback
callback);
782 // Cancels all ongoing file transfers.
783 // |callback| Completion callback of the cancel.
784 static
void cancelAllFileTransfers
(SimpleCallback
callback);
786 // Starts to copy an entry. If the source is a directory, the copy is done
788 // |entry| Entry of the source entry to be copied.
789 // |parentEntry| Entry for the destination (parent) directory.
790 // |newName| Name of the new entry. It must not contain '/'.
791 // |callback| Completion callback.
793 static
void startCopy
([instanceof
=Entry] object entry,
794 [instanceof
=DirectoryEntry
] object parentEntry
,
796 StartCopyCallback
callback);
798 // Cancels the running copy task.
799 // |copyId| ID of the copy task to be cancelled.
800 // |callback| Completion callback of the cancel.
801 static
void cancelCopy
(long copyId
, SimpleCallback
callback);
803 // Retrieves total and remaining size of a mount point.
804 // |volumeId| ID of the volume to be checked.
806 static
void getSizeStats
(DOMString volumeId
, GetSizeStatsCallback
callback);
808 // Formats a mounted volume.
809 // |volumeId| ID of the volume to be formatted.
810 static
void formatVolume
(DOMString volumeId
);
812 // Retrieves file manager preferences.
814 static
void getPreferences
(GetPreferencesCallback
callback);
816 // Sets file manager preferences.
818 static
void setPreferences
(PreferencesChange changeInfo
);
820 // Performs drive content search.
823 static
void searchDrive
(SearchParams searchParams
,
824 SearchDriveCallback
callback);
826 // Performs drive metadata search.
829 static
void searchDriveMetadata
(SearchMetadataParams searchParams
,
830 SearchDriveMetadataCallback
callback);
832 // Search files in the volume having |volumeId| by using |hashList|.
833 // sub-directories) the given |targetDirectoryUrl|.
834 static
void searchFilesByHashes
(DOMString volumeId
,
835 DOMString
[] hashList
,
836 SearchFilesByHashesCallback
callback);
838 // Create a zip file for the selected files.
839 // |parentEntry| Entry of the directory containing the selected files.
840 // |entries| Entries of the selected files. The files must be under the
841 // directory specified by |parentEntry|.
842 // |destName| Name of the destination zip file. The zip file will be created
843 // under the directory specified by |parentEntry|.
845 // TODO(mtomasz): Swap order of |entries| and |parentEntry|.
847 static
void zipSelection
([instanceof
=DirectoryEntry
] object parentEntry
,
848 [instanceof
=Entry] object[] entries
,
850 ZipSelectionCallback
callback);
852 // Retrieves the state of the current drive connection.
854 static
void getDriveConnectionState
(GetDriveConnectionStateCallback
callback);
856 // Checks whether the path name length fits in the limit of the filesystem.
857 // |parentEntry| The entry of the parent directory entry.
858 // |name| The name of the file.
859 // |callback| Called back when the check is finished.
861 static
void validatePathNameLength
(
862 [instanceof
=DirectoryEntry
] object parentEntry
,
864 ValidatePathNameLengthCallback
callback);
866 // Changes the zoom factor of the Files.app.
867 // |operation| Zooming mode.
868 static
void zoom
(ZoomOperationType operation
);
870 // Requests a Drive API OAuth2 access token.
871 // |refresh| Whether the token should be refetched instead of using the cached
874 static
void requestAccessToken
(boolean refresh
,
875 RequestAccessTokenCallback
callback);
877 // Requests a Webstore API OAuth2 access token.
879 static
void requestWebStoreAccessToken
(
880 RequestWebStoreAccessTokenCallback
callback);
882 // Requests a share dialog url for the specified file.
883 // |entry| The entry to share.
886 static
void getShareUrl
([instanceof
=Entry] object entry,
887 GetUrlCallback
callback);
889 // Requests a download url to download the file contents.
890 // |entry| The entry to download.
893 static
void getDownloadUrl
([instanceof
=Entry] object entry,
894 GetUrlCallback
callback);
896 // Requests to share drive files.
897 // |entry| Entry to be shared.
898 // |shareType| Type of access that is getting granted.
900 static
void requestDriveShare
([instanceof
=Entry] object entry,
901 DriveShareType shareType
,
902 SimpleCallback
callback);
904 // Obtains a list of profiles that are logged-in.
905 static
void getProfiles
(GetProfilesCallback
callback);
907 // Opens inspector window.
908 // |type| InspectionType which specifies how to open inspector.
909 static
void openInspector
(InspectionType type
);
911 // Computes an MD5 checksum for the given file.
912 // |entry| The entry of the file to checksum.
915 static
void computeChecksum
([instanceof
=Entry] object entry,
916 ComputeChecksumCallback
callback);
919 static
void isUMAEnabled
(BooleanCallback
callback);
921 // Sets a tag on a file or a directory. Only Drive files are supported.
923 static
void setEntryTag
([instanceof
=Entry] object entry,
924 EntryTagVisibility visibility
,
927 SimpleCallback
callback);
929 // Returns if Piex loader is enabled.
930 static
void isPiexLoaderEnabled
(BooleanCallback
callback);
932 // Returns list of available providing extensions.
933 static
void getProvidingExtensions
(GetProvidingExtensionsCallback
callback);
935 // Requests adding a new provided file system. If not possible, then an error
936 // via chrome.runtime.lastError is returned.
937 static
void addProvidedFileSystem
(DOMString extension_id
,
938 SimpleCallback
callback);
940 // Requests configuring an existing volume. If not possible, then returns
941 // an error via chrome.runtime.lastError.
942 static
void configureVolume
(DOMString volumeId
, SimpleCallback
callback);
944 // Requests list of actions for the specified file. If not possible, then an
945 // error via chrome.runtime.lastError is returned.
947 static
void getEntryActions
([instanceof
=Entry] object entry,
948 GetEntryActionsCallback
callback);
950 // Executes the entry action. If not possible, then an error via
951 // chrome.runtime.lastError is returned.
953 static
void executeEntryAction
([instanceof
=Entry] object entry,
955 SimpleCallback
callback);
959 static
void onMountCompleted
(MountCompletedEvent event
);
961 static
void onFileTransfersUpdated
(FileTransferStatus event
);
963 static
void onCopyProgress
(long copyId
, CopyProgressStatus status
);
965 static
void onDirectoryChanged
(FileWatchEvent event
);
967 static
void onPreferencesChanged
();
969 static
void onDriveConnectionStatusChanged
();
971 static
void onDeviceChanged
(DeviceEvent event
);
973 static
void onDriveSyncError
(DriveSyncErrorEvent event
);