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 // There is no server space to sync a file.
127 // Miscellaneous errors other than listed above.
131 // Result of task execution.
133 // The task execution succeeded and a new window/tab was opened.
135 // The task execution succeeded and the message was sent to the proper
138 // The task execution failed.
140 // No URL is specified.
145 enum DriveShareType
{
151 // Names of properies for getEntryProperties().
152 enum EntryPropertyName
{
164 availableWhenMetered
,
173 // Entry property visibility for setEntryTag();
174 enum EntryTagVisibility
{
179 // Source of the volume data.
187 // A file task represents an action that the file manager can perform over the
188 // currently selected files. See
189 // chrome/browser/chromeos/extensions/file_manager/file_tasks.h for details
190 // about how file tasks are handled.
191 dictionary FileTask
{
192 // The unique identifier of the task.
195 // Task title (ex. App name).
198 // Task icon url (from chrome://extension-icon/...)
201 // True if this task is a default task for the selected files.
204 // True if this task is from generic file handler. Generic file handler is a
205 // file handler which handles any type of files (e.g. extensions: ["*"],
206 // types: ["*/*"]). Partial wild card (e.g. types: ["image/*"]) is not
207 // generic file handler.
208 boolean isGenericFileHandler
;
211 // Additional entry properties.
212 dictionary EntryProperties
{
213 // Size of this file.
216 // Timestamp of entry update time, in milliseconds past the epoch.
217 double? modificationTime
;
219 // URL to the Drive thumbnail image for this file.
220 DOMString? thumbnailUrl
;
222 // URL to the Drive cropped thumbnail image for this file.
223 DOMString? croppedThumbnailUrl
;
225 // Width, if the entry is an image.
228 // Height, if the entry is an image.
231 // Rotation in clockwise degrees, if the entry is an image.
234 // True if the file is pinned in cache.
237 // True if the file is present in cache.
240 // True if the file is hosted on a server instead of local.
243 // True if the file is available offline.
244 boolean? availableOffline
;
246 // True if the file is available on metered connection.
247 boolean? availableWhenMetered
;
249 // True if the file has local change (has not been fully synced to the cloud).
252 // URL to the custom icon for this file.
253 DOMString? customIconUrl
;
255 // Drive MIME type for this file.
256 DOMString? contentMimeType
;
258 // True if the entry is labeled as shared-with-me.
259 boolean? sharedWithMe
;
261 // True if the entry is labeled as shared (either from me to others or to me
265 // External file URL to open the file in browser.
266 DOMString? externalFileUrl
;
269 // Information about total and remaining size on the mount point.
270 dictionary MountPointSizeStats
{
271 // Approximate total available size on the mount point.
274 // Approximate remaining available size on the mount point.
275 double remainingSize
;
278 // Information about a profile.
279 dictionary ProfileInfo
{
280 // Profile ID. This is currently e-mail address of the profile.
283 // The name of the profile for display purpose.
284 DOMString displayName
;
286 // True if the profile is the one running the current file manager instance.
287 // TODO(hirono): Remove the property because of the design change of
288 // multi-profile suuport.
289 boolean isCurrentProfile
;
292 // Mounted disk volume metadata.
293 dictionary VolumeMetadata
{
294 // ID of the disk volume.
297 // Id the provided file system (for provided file systems).
298 DOMString? fileSystemId
;
300 // Extension providing this volume (for provided file systems).
301 DOMString? extensionId
;
303 // Source of the volume's data.
306 // Label of the volume (if available).
307 DOMString? volumeLabel
;
309 // Description of the profile where the volume belongs.
310 // TODO(hirono): Remove the property because of the design change of
311 // multi-profile support.
314 // The path to the mounted device, archive file or network resource.
315 DOMString? sourcePath
;
317 // Type of the mounted volume.
318 VolumeType volumeType
;
320 // Device type. Available if this is removable volume.
321 DeviceType? deviceType
;
323 // Path to identify the device. This is consistent with DeviceEvent's
325 DOMString? devicePath
;
327 // Whether the device is parent or not (i.e. sdb rather than sdb1).
328 boolean? isParentDevice
;
330 // Flag that specifies if volume is mounted in read-only mode.
333 // Flag that specifies whether the volume contains media.
336 // Flag that specifies whether the volume is configurable.
337 boolean configurable
;
339 // Flag that specifies whether the volume is watchable.
342 // Additional data about mount, for example, that the filesystem is not
344 MountCondition? mountCondition
;
346 // Context in which the volume has been mounted.
347 MountContext? mountContext
;
350 // Payload data for mount event.
351 dictionary MountCompletedEvent
{
352 // Is the event raised for mounting or unmounting.
353 MountCompletedEventType eventType
;
355 // Event type that tells listeners if mount was successful or an error
356 // occurred. It also specifies the error.
357 MountCompletedStatus status
;
359 // Metadata of the mounted volume.
360 VolumeMetadata volumeMetadata
;
362 // Whether the volume event should be notified or not.
363 boolean shouldNotify
;
366 // Payload data for file transfer status updates.
367 dictionary FileTransferStatus
{
368 // URL of file that is being transfered.
371 // File transfer progress state.
372 TransferState transferState
;
374 // Defines file transfer direction.
375 TransferType transferType
;
377 // Approximated completed portion of the transfer operation.
380 // Approximated total size of transfer operation.
383 // Total number of jobs.
387 // Error during the drive sync.
388 dictionary DriveSyncErrorEvent
{
390 DriveSyncErrorType type
;
392 // File URL of the entry that the error happens to.
396 // Payload data for copy status progress updates.
397 dictionary CopyProgressStatus
{
398 // The type of the progress event.
399 CopyProgressStatusType type
;
401 // URL for the entry currently being copied. This field is particularly useful
402 // when a directory copy is initiated with startCopy(). The field tells what
403 // file/directory in that directory is now being copied.
404 DOMString? sourceUrl
;
406 // URL for the entry currently being created. This field is particularly
407 // useful when a directory copy is initiated with startCopy(). The field tells
408 // what file/directory in that directory is being created. Available only for
409 // end_copy_entry and success.
410 DOMString? destinationUrl
;
412 // Number of processed bytes for the file currently being copied. Available
413 // only for "progress" event. To show the progress bar, a caller needs to
414 // pre-compute the size of files being copied for the file (not directory).
417 // DOMError's name. Available only for ERROR event.
421 // Detailed information of change.
422 dictionary FileChange
{
423 // URL of changed file (or directory).
426 // Type of change, which may be multiple.
427 ChangeType
[] changes
;
430 // Directory change notification details.
431 dictionary FileWatchEvent
{
432 // Specifies type of event that is raised.
433 FileWatchEventType eventType
;
435 // An Entry object which represents a changed directory. The conversion into a
436 // kind of FileEntry object is done in
437 // file_browser_handler_custom_bindings.cc. For filesystem API's Entry
439 // href='http://www.w3.org/TR/file-system-api/#the-entry-interface'>The Entry
441 [instanceOf
=Entry] object entry;
443 // Detailed change information of change. It would be null if the detailed
444 // information is not available.
445 FileChange
[]? changedFiles
;
448 dictionary Preferences
{
449 boolean driveEnabled
;
450 boolean cellularDisabled
;
451 boolean hostedFilesDisabled
;
452 boolean searchSuggestEnabled
;
453 boolean use24hourClock
;
454 boolean allowRedeemOffers
;
458 dictionary PreferencesChange
{
459 boolean? cellularDisabled
;
460 boolean? hostedFilesDisabled
;
463 dictionary SearchParams
{
467 // ID of the search feed that should be fetched next. Value passed here should
468 // be gotten from previous searchDrive call. It can be empty for the initial
473 dictionary SearchMetadataParams
{
474 // Search query. It can be empty. Any filename matches to an empty query.
477 // The type of entry that is needed. Default to ALL.
480 // Maximum number of results.
484 // Entry and Drive-related properties representing a search result.
485 dictionary SearchResult
{
486 // A dictionary object which represents a Drive file. This will be converted
487 // into a kind of FileEntry object. See
488 // file_browser_handler_custom_bindings.cc for details. For filesystem API's
489 // Entry interface, see <a
490 // href='http://www.w3.org/TR/file-system-api/#the-entry-interface'>The Entry
492 [instanceOf
=Entry] object entry;
494 // The base name of a Drive file that matched the search query. The matched
495 // sub strings are highlighted with <b> element. Meta characters are escaped
497 DOMString highlightedBaseName
;
500 dictionary DriveConnectionState
{
503 // Reasons of offline.
506 // Whether the device has a cellular network access or not. i.e. the |type|
507 // can be 'metered' or not.
508 boolean hasCellularNetworkAccess
;
511 // Device event dispatched to listeners of onDeviceChaged. See also
512 // DeviceEventType to know when the event dispatched.
513 dictionary DeviceEvent
{
514 // Event type of the device event.
515 DeviceEventType type
;
516 // Device path to identify the device.
517 DOMString devicePath
;
520 // Describes an installed providing extension.
521 dictionary ProvidingExtension
{
522 // ID of the providing extension.
523 DOMString extensionId
;
525 // Name of the providing extension.
528 // Whether supports configuration dialog.
529 boolean configurable
;
531 // Whether supports watching entries.
534 // Whether supports mounting multiple instances.
535 boolean multipleMounts
;
537 // Source of file systems' data.
538 manifestTypes.FileSystemProviderSource
source;
541 // Callback that does not take arguments.
542 callback SimpleCallback
= void();
544 // |result| Boolean result returned by the invoked function.
545 callback BooleanCallback
= void(boolean result
);
547 // |result| Result of the task execution.
548 callback ExecuteTaskCallback
= void(TaskResult result
);
550 // |tasks| The list of matched file entries for this task.
551 callback GetFileTasksCallback
= void(FileTask
[] tasks
);
553 // |result| Mime type of the file.
554 callback GetMimeTypeCallback
= void(DOMString result
);
556 // |result| Hash containing the string assets.
557 callback GetStringsCallback
= void(object result
);
559 // |success| True when file watch is successfully added.
560 callback AddFileWatchCallback
= void(optional boolean success
);
562 // |success| True when file watch is successfully removed.
563 callback RemoveFileWatchCallback
= void(optional boolean success
);
565 // |entryProperties| A dictionary containing properties of the requested
567 callback GetEntryPropertiesCallback
=
568 void(EntryProperties
[] entryProperties
);
570 // |sourcePath| Source path of the mount.
571 callback AddMountCallback
= void(DOMString sourcePath
);
573 // |volumeMetadataList| The list of VolumeMetadata representing mounted volumes.
574 callback GetVolumeMetadataListCallback
=
575 void(VolumeMetadata
[] volumeMetadataList
);
577 // |fileTransferCancelStatuses| The list of FileTransferCancelStatus.
578 callback CancelFileTransfersCallback
=
579 void(FileTransferCancelStatus
[] fileTransferCancelStatuses
);
581 // |copyId| ID of the copy task. Can be used to identify the progress, and to
583 callback StartCopyCallback
= void(long copyId
);
585 // |sizeStats| Name/value pairs of size stats. Will be undefined if stats could
586 // not be determined.
587 callback GetSizeStatsCallback
= void(optional MountPointSizeStats sizeStats
);
589 callback GetPreferencesCallback
= void(Preferences result
);
592 // |nextFeed| ID of the feed that contains next chunk of the search result.
593 // Should be sent to the next searchDrive request to perform
594 // incremental search.
595 callback SearchDriveCallback
=
596 void([instanceOf
=Entry] object[] entries
, DOMString nextFeed
);
598 callback SearchDriveMetadataCallback
= void(SearchResult
[] results
);
600 // |urls| The map of hash and array of FileEntry's URL. The array can be empty
601 // if the corresponding file is not found.
602 callback SearchFilesByHashesCallback
= void(object urls
);
604 callback ZipSelectionCallback
= void(optional boolean success
);
606 callback GetDriveConnectionStateCallback
= void(DriveConnectionState result
);
608 // |result| true if the length is in the valid range, false otherwise.
609 callback ValidatePathNameLengthCallback
= void(boolean result
);
611 // |accessToken| OAuth2 access token, or an empty string if failed to fetch.
612 callback RequestAccessTokenCallback
= void(DOMString accessToken
);
614 // |accessToken| OAuth2 access token, or an empty string if failed to fetch.
615 callback RequestWebStoreAccessTokenCallback
= void(DOMString accessToken
);
618 callback GetUrlCallback
= void(DOMString url
);
620 // |profiles| List of profile information.
621 // |runningProfile| ID of the profile that runs the application instance.
622 // |showingProfile| ID of the profile that shows the application window.
623 callback GetProfilesCallback
= void(ProfileInfo
[] profiles
,
624 DOMString runningProfile
,
625 DOMString displayProfile
);
627 // |entries| External entries.
628 callback ResolveEntriesCallback
=
629 void([instanceOf
=Entry] object[] entries
);
631 // |checksum| Result checksum.
632 callback ComputeChecksumCallback
= void(DOMString checksum
);
634 // |extensions| List of providing extensions.
635 callback GetProvidingExtensionsCallback
= void(ProvidingExtension
[] extensions
);
637 // |actions| List of actions.
638 callback GetEntryActionsCallback
= void(fileSystemProvider.Action
[] actions
);
640 interface Functions
{
641 // Logout the current user for navigating to the re-authentication screen for
642 // the Google account.
643 static
void logoutUserForReauthentication
();
645 // Cancels file selection.
646 static
void cancelDialog
();
648 // Executes file browser task over selected files.
649 // |taskId| The unique identifier of task to execute.
650 // |entries| Array of entries
653 static
void executeTask
(DOMString taskId
,
654 [instanceof
=Entry] object[] entries
,
655 ExecuteTaskCallback
callback);
657 // Sets the default task for the supplied MIME types and path extensions.
658 // Lists of MIME types and URLs may contain duplicates. Additionally, the
659 // list of MIME types can be empty.
660 // |taskId| The unique identifier of task to mark as default.
661 // |entries| Array of selected entries to extract path extensions from.
662 // |mimeTypes| Array of selected file MIME types.
665 static
void setDefaultTask
(DOMString taskId
,
666 [instanceof
=Entry] object[] entries
,
667 DOMString
[] mimeTypes
,
668 SimpleCallback
callback);
670 // Gets the list of tasks that can be performed over selected files.
671 // |entries| Array of selected entries
674 static
void getFileTasks
([instanceof
=Entry] object[] entries
,
675 GetFileTasksCallback
callback);
677 // Gets the MIME type of a file.
678 // |entry| Entry to be checked.
681 static
void getMimeType
([instanceof
=Entry] object entry,
682 GetMimeTypeCallback
callback);
684 // Gets localized strings and initialization data.
686 static
void getStrings
(GetStringsCallback
callback);
689 // |entry| Entry to watch
692 static
void addFileWatch
([instanceof
=Entry] object entry,
693 AddFileWatchCallback
callback);
695 // Removes file watch.
696 // |entry| Watched entry
699 static
void removeFileWatch
([instanceof
=Entry] object entry,
700 RemoveFileWatchCallback
callback);
702 // Enables the extenal file scheme necessary to initiate drags to the browser
703 // window for files on the external backend.
704 static
void enableExternalFileScheme
();
706 // Requests granting R/W permissions for the passed entries. It's a best
707 // effort operation. Some files may not be granted access if the url is
708 // invalid or not backed by the external file system.
709 // |entryUrls| Urls for the entries to be accessed.
711 static
void grantAccess
(DOMString
[] entryUrls
, SimpleCallback
callback);
713 // Selects multiple files.
714 // |selectedPaths| Array of selected paths
715 // |shouldReturnLocalPath| true if paths need to be resolved to local paths.
717 static
void selectFiles
(DOMString
[] selectedPaths
,
718 boolean shouldReturnLocalPath
,
719 SimpleCallback
callback);
722 // |selectedPath| A selected path
723 // |index| Index of Filter
724 // |forOpening| true if paths are selected for opening. false if for saving.
725 // |shouldReturnLocalPath| true if paths need to be resolved to local paths.
727 static
void selectFile
(DOMString selectedPath
,
730 boolean shouldReturnLocalPath
,
731 SimpleCallback
callback);
733 // Requests additional properties for files.
734 // |entries| list of entries
735 // |names| list of requested properties by their names.
736 // |callback| Completion callback. May return less than requested properties
737 // if some are not available. In the same time, it can return properties
738 // which were not requested (if it's cheap to compute them).
740 static
void getEntryProperties
(
741 [instanceOf
=Entry] object[] entries
,
742 EntryPropertyName
[] names
,
743 GetEntryPropertiesCallback
callback);
745 // Pins/unpins a Drive file in the cache.
746 // |entry| Entry to pin/unpin.
747 // |pin| Pass true to pin the file.
748 // |callback| Completion callback. $(ref:runtime.lastError) will be set if
749 // there was an error.
751 static
void pinDriveFile
([instanceof
=Entry] object entry,
753 SimpleCallback
callback);
755 // Resolves entries in the isolated file system and returns corresponding
756 // entries in the external file system mounted to Chrome OS file manager
757 // backend. If resolving entry fails, the entry will be just ignored and the
758 // corresponding entry does not appear in the result.
760 static
void resolveIsolatedEntries
(
761 [instanceOf
=Entry] object[] entries
,
762 ResolveEntriesCallback
callback);
764 // Mount a resource or a file.
765 // |source| Mount point source. For compressed files it is relative file path
766 // within external file system
768 static
void addMount
(DOMString
source, AddMountCallback
callback);
770 // Unmounts a mounted resource.
771 // |volumeId| An ID of the volume.
772 static
void removeMount
(DOMString volumeId
);
774 // Get the list of mounted volumes.
776 static
void getVolumeMetadataList
(GetVolumeMetadataListCallback
callback);
778 // Cancels ongoing file transfers for selected files.
779 // |entries| Array of files for which ongoing transfer should be canceled.
780 // |callback| Completion callback of the cancel.
782 static
void cancelFileTransfers
([instanceof
=Entry] object[] entries
,
783 SimpleCallback
callback);
785 // Cancels all ongoing file transfers.
786 // |callback| Completion callback of the cancel.
787 static
void cancelAllFileTransfers
(SimpleCallback
callback);
789 // Starts to copy an entry. If the source is a directory, the copy is done
791 // |entry| Entry of the source entry to be copied.
792 // |parentEntry| Entry for the destination (parent) directory.
793 // |newName| Name of the new entry. It must not contain '/'.
794 // |callback| Completion callback.
796 static
void startCopy
([instanceof
=Entry] object entry,
797 [instanceof
=DirectoryEntry
] object parentEntry
,
799 StartCopyCallback
callback);
801 // Cancels the running copy task.
802 // |copyId| ID of the copy task to be cancelled.
803 // |callback| Completion callback of the cancel.
804 static
void cancelCopy
(long copyId
, SimpleCallback
callback);
806 // Retrieves total and remaining size of a mount point.
807 // |volumeId| ID of the volume to be checked.
809 static
void getSizeStats
(DOMString volumeId
, GetSizeStatsCallback
callback);
811 // Formats a mounted volume.
812 // |volumeId| ID of the volume to be formatted.
813 static
void formatVolume
(DOMString volumeId
);
815 // Retrieves file manager preferences.
817 static
void getPreferences
(GetPreferencesCallback
callback);
819 // Sets file manager preferences.
821 static
void setPreferences
(PreferencesChange changeInfo
);
823 // Performs drive content search.
826 static
void searchDrive
(SearchParams searchParams
,
827 SearchDriveCallback
callback);
829 // Performs drive metadata search.
832 static
void searchDriveMetadata
(SearchMetadataParams searchParams
,
833 SearchDriveMetadataCallback
callback);
835 // Search files in the volume having |volumeId| by using |hashList|.
836 // sub-directories) the given |targetDirectoryUrl|.
837 static
void searchFilesByHashes
(DOMString volumeId
,
838 DOMString
[] hashList
,
839 SearchFilesByHashesCallback
callback);
841 // Create a zip file for the selected files.
842 // |parentEntry| Entry of the directory containing the selected files.
843 // |entries| Entries of the selected files. The files must be under the
844 // directory specified by |parentEntry|.
845 // |destName| Name of the destination zip file. The zip file will be created
846 // under the directory specified by |parentEntry|.
848 // TODO(mtomasz): Swap order of |entries| and |parentEntry|.
850 static
void zipSelection
([instanceof
=DirectoryEntry
] object parentEntry
,
851 [instanceof
=Entry] object[] entries
,
853 ZipSelectionCallback
callback);
855 // Retrieves the state of the current drive connection.
857 static
void getDriveConnectionState
(GetDriveConnectionStateCallback
callback);
859 // Checks whether the path name length fits in the limit of the filesystem.
860 // |parentEntry| The entry of the parent directory entry.
861 // |name| The name of the file.
862 // |callback| Called back when the check is finished.
864 static
void validatePathNameLength
(
865 [instanceof
=DirectoryEntry
] object parentEntry
,
867 ValidatePathNameLengthCallback
callback);
869 // Changes the zoom factor of the Files.app.
870 // |operation| Zooming mode.
871 static
void zoom
(ZoomOperationType operation
);
873 // Requests a Drive API OAuth2 access token.
874 // |refresh| Whether the token should be refetched instead of using the cached
877 static
void requestAccessToken
(boolean refresh
,
878 RequestAccessTokenCallback
callback);
880 // Requests a Webstore API OAuth2 access token.
882 static
void requestWebStoreAccessToken
(
883 RequestWebStoreAccessTokenCallback
callback);
885 // Requests a share dialog url for the specified file.
886 // |entry| The entry to share.
889 static
void getShareUrl
([instanceof
=Entry] object entry,
890 GetUrlCallback
callback);
892 // Requests a download url to download the file contents.
893 // |entry| The entry to download.
896 static
void getDownloadUrl
([instanceof
=Entry] object entry,
897 GetUrlCallback
callback);
899 // Requests to share drive files.
900 // |entry| Entry to be shared.
901 // |shareType| Type of access that is getting granted.
903 static
void requestDriveShare
([instanceof
=Entry] object entry,
904 DriveShareType shareType
,
905 SimpleCallback
callback);
907 // Obtains a list of profiles that are logged-in.
908 static
void getProfiles
(GetProfilesCallback
callback);
910 // Opens inspector window.
911 // |type| InspectionType which specifies how to open inspector.
912 static
void openInspector
(InspectionType type
);
914 // Computes an MD5 checksum for the given file.
915 // |entry| The entry of the file to checksum.
918 static
void computeChecksum
([instanceof
=Entry] object entry,
919 ComputeChecksumCallback
callback);
922 static
void isUMAEnabled
(BooleanCallback
callback);
924 // Sets a tag on a file or a directory. Only Drive files are supported.
926 static
void setEntryTag
([instanceof
=Entry] object entry,
927 EntryTagVisibility visibility
,
930 SimpleCallback
callback);
932 // Returns if Piex loader is enabled.
933 static
void isPiexLoaderEnabled
(BooleanCallback
callback);
935 // Returns list of available providing extensions.
936 static
void getProvidingExtensions
(GetProvidingExtensionsCallback
callback);
938 // Requests adding a new provided file system. If not possible, then an error
939 // via chrome.runtime.lastError is returned.
940 static
void addProvidedFileSystem
(DOMString extension_id
,
941 SimpleCallback
callback);
943 // Requests configuring an existing volume. If not possible, then returns
944 // an error via chrome.runtime.lastError.
945 static
void configureVolume
(DOMString volumeId
, SimpleCallback
callback);
947 // Requests list of actions for the specified file. If not possible, then an
948 // error via chrome.runtime.lastError is returned.
950 static
void getEntryActions
([instanceof
=Entry] object entry,
951 GetEntryActionsCallback
callback);
953 // Executes the entry action. If not possible, then an error via
954 // chrome.runtime.lastError is returned.
956 static
void executeEntryAction
([instanceof
=Entry] object entry,
958 SimpleCallback
callback);
962 static
void onMountCompleted
(MountCompletedEvent event
);
964 static
void onFileTransfersUpdated
(FileTransferStatus event
);
966 static
void onCopyProgress
(long copyId
, CopyProgressStatus status
);
968 static
void onDirectoryChanged
(FileWatchEvent event
);
970 static
void onPreferencesChanged
();
972 static
void onDriveConnectionStatusChanged
();
974 static
void onDeviceChanged
(DeviceEvent event
);
976 static
void onDriveSyncError
(DriveSyncErrorEvent event
);