Commit 71fc94ca authored by fukino's avatar fukino Committed by Commit bot

Fix closure comilation error.

As a quick fix, I'll revert the change of file_manager_private.js in
https://codereview.chromium.org/2580303002/.

BUG=none
TBR=nya@chromium.org
TEST=run third_party/closure_compiler/run_compiler

Review-Url: https://codereview.chromium.org/2625233004
Cr-Commit-Position: refs/heads/master@{#443214}
parent 6d4cb822
// Copyright 2017 The Chromium Authors. All rights reserved. // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// This file was generated by:
// tools/json_schema_compiler/compiler.py.
// NOTE: The format of types has changed. 'FooType' is now
// 'chrome.fileManagerPrivate.FooType'.
// Please run the closure compiler before committing changes.
// See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md
/** @fileoverview Externs generated from namespace: fileManagerPrivate */ /** @fileoverview Externs generated from namespace: fileManagerPrivate */
/**
* @const
*/
chrome.fileManagerPrivate = {};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-VolumeType
*/
chrome.fileManagerPrivate.VolumeType = {
DRIVE: 'drive',
DOWNLOADS: 'downloads',
REMOVABLE: 'removable',
ARCHIVE: 'archive',
PROVIDED: 'provided',
MTP: 'mtp',
MEDIA_VIEW: 'media_view',
TESTING: 'testing',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-DeviceType
*/
chrome.fileManagerPrivate.DeviceType = {
USB: 'usb',
SD: 'sd',
OPTICAL: 'optical',
MOBILE: 'mobile',
UNKNOWN: 'unknown',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-MountCondition
*/
chrome.fileManagerPrivate.MountCondition = {
UNKNOWN: 'unknown',
UNSUPPORTED: 'unsupported',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-MountContext
*/
chrome.fileManagerPrivate.MountContext = {
USER: 'user',
AUTO: 'auto',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-MountCompletedEventType
*/
chrome.fileManagerPrivate.MountCompletedEventType = {
MOUNT: 'mount',
UNMOUNT: 'unmount',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-MountCompletedStatus
*/
chrome.fileManagerPrivate.MountCompletedStatus = {
SUCCESS: 'success',
ERROR_UNKNOWN: 'error_unknown',
ERROR_INTERNAL: 'error_internal',
ERROR_INVALID_ARGUMENT: 'error_invalid_argument',
ERROR_INVALID_PATH: 'error_invalid_path',
ERROR_PATH_ALREADY_MOUNTED: 'error_path_already_mounted',
ERROR_PATH_NOT_MOUNTED: 'error_path_not_mounted',
ERROR_DIRECTORY_CREATION_FAILED: 'error_directory_creation_failed',
ERROR_INVALID_MOUNT_OPTIONS: 'error_invalid_mount_options',
ERROR_INVALID_UNMOUNT_OPTIONS: 'error_invalid_unmount_options',
ERROR_INSUFFICIENT_PERMISSIONS: 'error_insufficient_permissions',
ERROR_MOUNT_PROGRAM_NOT_FOUND: 'error_mount_program_not_found',
ERROR_MOUNT_PROGRAM_FAILED: 'error_mount_program_failed',
ERROR_INVALID_DEVICE_PATH: 'error_invalid_device_path',
ERROR_UNKNOWN_FILESYSTEM: 'error_unknown_filesystem',
ERROR_UNSUPPORTED_FILESYSTEM: 'error_unsupported_filesystem',
ERROR_INVALID_ARCHIVE: 'error_invalid_archive',
ERROR_AUTHENTICATION: 'error_authentication',
ERROR_PATH_UNMOUNTED: 'error_path_unmounted',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-TransferState
*/
chrome.fileManagerPrivate.TransferState = {
IN_PROGRESS: 'in_progress',
COMPLETED: 'completed',
FAILED: 'failed',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-TransferType
*/
chrome.fileManagerPrivate.TransferType = {
UPLOAD: 'upload',
DOWNLOAD: 'download',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-CopyProgressStatusType
*/
chrome.fileManagerPrivate.CopyProgressStatusType = {
BEGIN_COPY_ENTRY: 'begin_copy_entry',
END_COPY_ENTRY: 'end_copy_entry',
PROGRESS: 'progress',
SUCCESS: 'success',
ERROR: 'error',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-FileWatchEventType
*/
chrome.fileManagerPrivate.FileWatchEventType = {
CHANGED: 'changed',
ERROR: 'error',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-ChangeType
*/
chrome.fileManagerPrivate.ChangeType = {
ADD_OR_UPDATE: 'add_or_update',
DELETE: 'delete',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-SearchType
*/
chrome.fileManagerPrivate.SearchType = {
EXCLUDE_DIRECTORIES: 'EXCLUDE_DIRECTORIES',
SHARED_WITH_ME: 'SHARED_WITH_ME',
OFFLINE: 'OFFLINE',
ALL: 'ALL',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-ZoomOperationType
*/
chrome.fileManagerPrivate.ZoomOperationType = {
IN: 'in',
OUT: 'out',
RESET: 'reset',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-InspectionType
*/
chrome.fileManagerPrivate.InspectionType = {
NORMAL: 'normal',
CONSOLE: 'console',
ELEMENT: 'element',
BACKGROUND: 'background',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-DeviceEventType
*/
chrome.fileManagerPrivate.DeviceEventType = {
DISABLED: 'disabled',
REMOVED: 'removed',
HARD_UNPLUGGED: 'hard_unplugged',
FORMAT_START: 'format_start',
FORMAT_SUCCESS: 'format_success',
FORMAT_FAIL: 'format_fail',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-DriveSyncErrorType
*/
chrome.fileManagerPrivate.DriveSyncErrorType = {
DELETE_WITHOUT_PERMISSION: 'delete_without_permission',
SERVICE_UNAVAILABLE: 'service_unavailable',
NO_SERVER_SPACE: 'no_server_space',
MISC: 'misc',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-TaskResult
*/
chrome.fileManagerPrivate.TaskResult = {
OPENED: 'opened',
MESSAGE_SENT: 'message_sent',
FAILED: 'failed',
EMPTY: 'empty',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-DriveShareType
*/
chrome.fileManagerPrivate.DriveShareType = {
CAN_EDIT: 'can_edit',
CAN_COMMENT: 'can_comment',
CAN_VIEW: 'can_view',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-EntryPropertyName
*/
chrome.fileManagerPrivate.EntryPropertyName = {
SIZE: 'size',
MODIFICATION_TIME: 'modificationTime',
THUMBNAIL_URL: 'thumbnailUrl',
CROPPED_THUMBNAIL_URL: 'croppedThumbnailUrl',
IMAGE_WIDTH: 'imageWidth',
IMAGE_HEIGHT: 'imageHeight',
IMAGE_ROTATION: 'imageRotation',
PINNED: 'pinned',
PRESENT: 'present',
HOSTED: 'hosted',
AVAILABLE_OFFLINE: 'availableOffline',
AVAILABLE_WHEN_METERED: 'availableWhenMetered',
DIRTY: 'dirty',
CUSTOM_ICON_URL: 'customIconUrl',
CONTENT_MIME_TYPE: 'contentMimeType',
SHARED_WITH_ME: 'sharedWithMe',
SHARED: 'shared',
STARRED: 'starred',
EXTERNAL_FILE_URL: 'externalFileUrl',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-EntryTagVisibility
*/
chrome.fileManagerPrivate.EntryTagVisibility = {
PRIVATE: 'private',
PUBLIC: 'public',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-Source
*/
chrome.fileManagerPrivate.Source = {
FILE: 'file',
DEVICE: 'device',
NETWORK: 'network',
SYSTEM: 'system',
};
/**
* @enum {string}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-Verb
*/
chrome.fileManagerPrivate.Verb = {
OPEN_WITH: 'open_with',
ADD_TO: 'add_to',
PACK_WITH: 'pack_with',
SHARE_WITH: 'share_with',
};
/** /**
* @typedef {{ * @typedef {{
* taskId: string, * taskId: string,
* title: string, * title: string,
* verb: (!chrome.fileManagerPrivate.Verb|undefined),
* iconUrl: string, * iconUrl: string,
* isDefault: boolean, * isDefault: boolean
* isGenericFileHandler: boolean
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-FileTask
*/ */
chrome.fileManagerPrivate.FileTask; var FileTask;
/** /**
* @typedef {{ * @typedef {{
...@@ -298,34 +20,31 @@ chrome.fileManagerPrivate.FileTask; ...@@ -298,34 +20,31 @@ chrome.fileManagerPrivate.FileTask;
* modificationTime: (number|undefined), * modificationTime: (number|undefined),
* thumbnailUrl: (string|undefined), * thumbnailUrl: (string|undefined),
* croppedThumbnailUrl: (string|undefined), * croppedThumbnailUrl: (string|undefined),
* externalFileUrl: (string|undefined),
* imageWidth: (number|undefined), * imageWidth: (number|undefined),
* imageHeight: (number|undefined), * imageHeight: (number|undefined),
* imageRotation: (number|undefined), * imageRotation: (number|undefined),
* pinned: (boolean|undefined), * pinned: (boolean|undefined),
* present: (boolean|undefined), * present: (boolean|undefined),
* hosted: (boolean|undefined), * hosted: (boolean|undefined),
* dirty: (boolean|undefined),
* availableOffline: (boolean|undefined), * availableOffline: (boolean|undefined),
* availableWhenMetered: (boolean|undefined), * availableWhenMetered: (boolean|undefined),
* dirty: (boolean|undefined),
* customIconUrl: (string|undefined), * customIconUrl: (string|undefined),
* contentMimeType: (string|undefined), * contentMimeType: (string|undefined),
* sharedWithMe: (boolean|undefined), * sharedWithMe: (boolean|undefined),
* shared: (boolean|undefined), * shared: (boolean|undefined)
* starred: (boolean|undefined),
* externalFileUrl: (string|undefined)
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-EntryProperties
*/ */
chrome.fileManagerPrivate.EntryProperties; var EntryProperties;
/** /**
* @typedef {{ * @typedef {{
* totalSize: number, * totalSize: number,
* remainingSize: number * remainingSize: number
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-MountPointSizeStats
*/ */
chrome.fileManagerPrivate.MountPointSizeStats; var MountPointSizeStats;
/** /**
* @typedef {{ * @typedef {{
...@@ -333,21 +52,20 @@ chrome.fileManagerPrivate.MountPointSizeStats; ...@@ -333,21 +52,20 @@ chrome.fileManagerPrivate.MountPointSizeStats;
* displayName: string, * displayName: string,
* isCurrentProfile: boolean * isCurrentProfile: boolean
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-ProfileInfo
*/ */
chrome.fileManagerPrivate.ProfileInfo; var ProfileInfo;
/** /**
* @typedef {{ * @typedef {{
* volumeId: string, * volumeId: string,
* fileSystemId: (string|undefined), * fileSystemId: (string|undefined),
* extensionId: (string|undefined), * extensionId: (string|undefined),
* source: !chrome.fileManagerPrivate.Source, * source: string,
* volumeLabel: (string|undefined), * volumeLabel: (string|undefined),
* profile: !chrome.fileManagerPrivate.ProfileInfo, * profile: ProfileInfo,
* sourcePath: (string|undefined), * sourcePath: (string|undefined),
* volumeType: !chrome.fileManagerPrivate.VolumeType, * volumeType: string,
* deviceType: (!chrome.fileManagerPrivate.DeviceType|undefined), * deviceType: (string|undefined),
* devicePath: (string|undefined), * devicePath: (string|undefined),
* isParentDevice: (boolean|undefined), * isParentDevice: (boolean|undefined),
* isReadOnly: boolean, * isReadOnly: boolean,
...@@ -355,76 +73,69 @@ chrome.fileManagerPrivate.ProfileInfo; ...@@ -355,76 +73,69 @@ chrome.fileManagerPrivate.ProfileInfo;
* hasMedia: boolean, * hasMedia: boolean,
* configurable: boolean, * configurable: boolean,
* watchable: boolean, * watchable: boolean,
* mountCondition: (!chrome.fileManagerPrivate.MountCondition|undefined), * mountCondition: (string|undefined),
* mountContext: (!chrome.fileManagerPrivate.MountContext|undefined) * mountContext: (string|undefined)
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-VolumeMetadata
*/ */
chrome.fileManagerPrivate.VolumeMetadata; var VolumeMetadata;
/** /**
* @typedef {{ * @typedef {{
* eventType: !chrome.fileManagerPrivate.MountCompletedEventType, * eventType: string,
* status: !chrome.fileManagerPrivate.MountCompletedStatus, * status: string,
* volumeMetadata: !chrome.fileManagerPrivate.VolumeMetadata, * volumeMetadata: VolumeMetadata,
* shouldNotify: boolean * shouldNotify: boolean
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-MountCompletedEvent
*/ */
chrome.fileManagerPrivate.MountCompletedEvent; var MountCompletedEvent;
/** /**
* @typedef {{ * @typedef {{
* fileUrl: string, * fileUrl: string,
* transferState: !chrome.fileManagerPrivate.TransferState, * transferState: string,
* transferType: !chrome.fileManagerPrivate.TransferType, * transferType: string,
* processed: number, * processed: number,
* total: number, * total: number,
* num_total_jobs: number * num_total_jobs: number
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-FileTransferStatus
*/ */
chrome.fileManagerPrivate.FileTransferStatus; var FileTransferStatus;
/** /**
* @typedef {{ * @typedef {{
* type: !chrome.fileManagerPrivate.DriveSyncErrorType, * type: string,
* fileUrl: string * fileUrl: string
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-DriveSyncErrorEvent
*/ */
chrome.fileManagerPrivate.DriveSyncErrorEvent; var DriveSyncErrorEvent;
/** /**
* @typedef {{ * @typedef {{
* type: !chrome.fileManagerPrivate.CopyProgressStatusType, * type: string,
* sourceUrl: (string|undefined), * sourceUrl: (string|undefined),
* destinationUrl: (string|undefined), * destinationUrl: (string|undefined),
* size: (number|undefined), * size: (number|undefined),
* error: (string|undefined) * error: (string|undefined)
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-CopyProgressStatus
*/ */
chrome.fileManagerPrivate.CopyProgressStatus; var CopyProgressStatus;
/** /**
* @typedef {{ * @typedef {{
* url: string, * url: string,
* changes: !Array<!chrome.fileManagerPrivate.ChangeType> * changes: Array
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-FileChange
*/ */
chrome.fileManagerPrivate.FileChange; var FileChange;
/** /**
* @typedef {{ * @typedef {{
* eventType: !chrome.fileManagerPrivate.FileWatchEventType, * eventType: string,
* entry: Object, * entry: Object,
* changedFiles: (!Array<!chrome.fileManagerPrivate.FileChange>|undefined) * changedFiles: (Array|undefined)
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-FileWatchEvent
*/ */
chrome.fileManagerPrivate.FileWatchEvent; var FileWatchEvent;
/** /**
* @typedef {{ * @typedef {{
...@@ -436,65 +147,57 @@ chrome.fileManagerPrivate.FileWatchEvent; ...@@ -436,65 +147,57 @@ chrome.fileManagerPrivate.FileWatchEvent;
* allowRedeemOffers: boolean, * allowRedeemOffers: boolean,
* timezone: string * timezone: string
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-Preferences
*/ */
chrome.fileManagerPrivate.Preferences; var Preferences;
/** /**
* @typedef {{ * @typedef {{
* cellularDisabled: (boolean|undefined), * cellularDisabled: (boolean|undefined),
* hostedFilesDisabled: (boolean|undefined) * hostedFilesDisabled: (boolean|undefined)
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-PreferencesChange
*/ */
chrome.fileManagerPrivate.PreferencesChange; var PreferencesChange;
/** /**
* @typedef {{ * @typedef {{
* query: string, * query: string,
* nextFeed: string * nextFeed: string
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-SearchParams
*/ */
chrome.fileManagerPrivate.SearchParams; var SearchParams;
/** /**
* @typedef {{ * @typedef {{
* query: string, * query: string,
* types: !chrome.fileManagerPrivate.SearchType, * types: string,
* maxResults: number * maxResults: number
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-SearchMetadataParams
*/ */
chrome.fileManagerPrivate.SearchMetadataParams; var SearchMetadataParams;
/** /**
* @typedef {{ * @typedef {{
* entry: Object, * entry: Object,
* highlightedBaseName: string * highlightedBaseName: string
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-SearchResult
*/ */
chrome.fileManagerPrivate.SearchResult; var SearchResult;
/** /**
* @typedef {{ * @typedef {{
* type: string, * type: string,
* reason: (string|undefined), * reason: (string|undefined)
* hasCellularNetworkAccess: boolean
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-DriveConnectionState
*/ */
chrome.fileManagerPrivate.DriveConnectionState; var DriveConnectionState;
/** /**
* @typedef {{ * @typedef {{
* type: !chrome.fileManagerPrivate.DeviceEventType, * type: string,
* devicePath: string * devicePath: string
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-DeviceEvent
*/ */
chrome.fileManagerPrivate.DeviceEvent; var DeviceEvent;
/** /**
* @typedef {{ * @typedef {{
...@@ -503,109 +206,103 @@ chrome.fileManagerPrivate.DeviceEvent; ...@@ -503,109 +206,103 @@ chrome.fileManagerPrivate.DeviceEvent;
* configurable: boolean, * configurable: boolean,
* watchable: boolean, * watchable: boolean,
* multipleMounts: boolean, * multipleMounts: boolean,
* source: !chrome.fileManagerPrivate.manifestTypes.FileSystemProviderSource * source: string
* }}
*/
var ProvidingExtension;
/**
* @typedef {{
* id: string,
* title: (string|undefined)
* }} * }}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#type-ProvidingExtension
*/ */
chrome.fileManagerPrivate.ProvidingExtension; var EntryAction;
/**
* @const
*/
chrome.fileManagerPrivate = {};
/** /**
* Logout the current user for navigating to the re-authentication screen for * Logout the current user for navigating to the re-authentication screen for
* the Google account. * the Google account.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-logoutUserForReauthentication
*/ */
chrome.fileManagerPrivate.logoutUserForReauthentication = function() {}; chrome.fileManagerPrivate.logoutUserForReauthentication = function() {};
/** /**
* Cancels file selection. * Cancels file selection.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-cancelDialog
*/ */
chrome.fileManagerPrivate.cancelDialog = function() {}; chrome.fileManagerPrivate.cancelDialog = function() {};
/** /**
* Executes file browser task over selected files. |taskId| The unique * Executes file browser task over selected files. |taskId| The unique
* identifier of task to execute. |entries| Array of entries |callback| * identifier of task to execute. |entries| Array of file entries |callback|
* @param {string} taskId * @param {string} taskId
* @param {!Array<Object>} entries * @param {!Array<!Entry>} entries
* @param {function(!chrome.fileManagerPrivate.TaskResult):void} callback * @param {function((boolean|undefined))} callback |result| Result of the task
* |result| Result of the task execution. * execution.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-executeTask
*/ */
chrome.fileManagerPrivate.executeTask = function(taskId, entries, callback) {}; chrome.fileManagerPrivate.executeTask = function(taskId, entries, callback) {};
/** /**
* Sets the default task for the supplied MIME types and path extensions. Lists * Sets the default task for the supplied MIME types and path extensions.
* of MIME types and URLs may contain duplicates. Additionally, the list of MIME * Lists of MIME types and entries may contain duplicates.
* types can be empty. |taskId| The unique identifier of task to mark as * |taskId| The unique identifier of task to mark as default. |entries| Array
* default. |entries| Array of selected entries to extract path extensions from. * of selected file entries to extract path extensions from. |mimeTypes| Array
* |mimeTypes| Array of selected file MIME types. |callback| * of selected file MIME types. |callback|
* @param {string} taskId * @param {string} taskId
* @param {!Array<Object>} entries * @param {!Array<!Entry>} entries
* @param {!Array<string>} mimeTypes * @param {!Array<string>} mimeTypes
* @param {function():void} callback Callback that does not take arguments. * @param {!function()} callback Callback that does not take arguments.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-setDefaultTask
*/ */
chrome.fileManagerPrivate.setDefaultTask = function(taskId, entries, mimeTypes, callback) {}; chrome.fileManagerPrivate.setDefaultTask = function(taskId, entries, mimeTypes,
callback) {};
/** /**
* Gets the list of tasks that can be performed over selected files. |entries| * Gets the list of tasks that can be performed over selected files. |entries|
* Array of selected entries |callback| * Array of selected entries |callback|
* @param {!Array<Object>} entries * @param {!Array<!Entry>} entries
* @param {function(!Array<!chrome.fileManagerPrivate.FileTask>):void} callback * @param {function((!Array<!FileTask>|undefined))} callback |tasks| The list of
* |tasks| The list of matched file entries for this task. * matched file entries for this task.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-getFileTasks
*/ */
chrome.fileManagerPrivate.getFileTasks = function(entries, callback) {}; chrome.fileManagerPrivate.getFileTasks = function(entries, callback) {};
/**
* Gets the MIME type of a file. |entry| Entry to be checked. |callback|
* @param {Object} entry
* @param {function(string):void} callback |result| Mime type of the file.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-getMimeType
*/
chrome.fileManagerPrivate.getMimeType = function(entry, callback) {};
/** /**
* Gets localized strings and initialization data. |callback| * Gets localized strings and initialization data. |callback|
* @param {function(Object):void} callback |result| Hash containing the string * @param {function((!Object|undefined))} callback |result| Hash containing the
* assets. * string assets.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-getStrings
*/ */
chrome.fileManagerPrivate.getStrings = function(callback) {}; chrome.fileManagerPrivate.getStrings = function(callback) {};
/** /**
* Adds file watch. |entry| Entry to watch |callback| * Adds file watch. |entry| Entry of file to watch |callback|
* @param {Object} entry * @param {!Entry} entry
* @param {function(boolean):void} callback |success| True when file watch is * @param {function((boolean|undefined))} callback |success| True when file
* successfully added. * watch is successfully added.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-addFileWatch
*/ */
chrome.fileManagerPrivate.addFileWatch = function(entry, callback) {}; chrome.fileManagerPrivate.addFileWatch = function(entry, callback) {};
/** /**
* Removes file watch. |entry| Watched entry |callback| * Removes file watch. |entry| Entry of watched file to remove |callback|
* @param {Object} entry * @param {!Entry} entry
* @param {function(boolean):void} callback |success| True when file watch is * @param {function((boolean|undefined))} callback |success| True when file
* successfully removed. * watch is successfully
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-removeFileWatch * removed.
*/ */
chrome.fileManagerPrivate.removeFileWatch = function(entry, callback) {}; chrome.fileManagerPrivate.removeFileWatch = function(entry, callback) {};
/** /**
* Enables the extenal file scheme necessary to initiate drags to the browser * Enables the extenal file scheme necessary to initiate drags to the browser
* window for files on the external backend. * window for files on the external backend.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-enableExternalFileScheme
*/ */
chrome.fileManagerPrivate.enableExternalFileScheme = function() {}; chrome.fileManagerPrivate.enableExternalFileScheme = function() {};
/** /**
* Requests granting R/W permissions for the passed entries. It's a best effort * Requests R/W access to the specified entries as |entryUrls|. Note, that only
* operation. Some files may not be granted access if the url is invalid or not * files backed by external file system backend will be granted the access.
* backed by the external file system. |entryUrls| Urls for the entries to be
* accessed. |callback|
* @param {!Array<string>} entryUrls * @param {!Array<string>} entryUrls
* @param {function():void} callback Callback that does not take arguments. * @param {function()} callback Completion callback.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-grantAccess
*/ */
chrome.fileManagerPrivate.grantAccess = function(entryUrls, callback) {}; chrome.fileManagerPrivate.grantAccess = function(entryUrls, callback) {};
...@@ -615,10 +312,10 @@ chrome.fileManagerPrivate.grantAccess = function(entryUrls, callback) {}; ...@@ -615,10 +312,10 @@ chrome.fileManagerPrivate.grantAccess = function(entryUrls, callback) {};
* |callback| * |callback|
* @param {!Array<string>} selectedPaths * @param {!Array<string>} selectedPaths
* @param {boolean} shouldReturnLocalPath * @param {boolean} shouldReturnLocalPath
* @param {function():void} callback Callback that does not take arguments. * @param {function()} callback Callback that does not take arguments.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-selectFiles
*/ */
chrome.fileManagerPrivate.selectFiles = function(selectedPaths, shouldReturnLocalPath, callback) {}; chrome.fileManagerPrivate.selectFiles = function(selectedPaths,
shouldReturnLocalPath, callback) {};
/** /**
* Selects a file. |selectedPath| A selected path |index| Index of Filter * Selects a file. |selectedPath| A selected path |index| Index of Filter
...@@ -629,112 +326,100 @@ chrome.fileManagerPrivate.selectFiles = function(selectedPaths, shouldReturnLoca ...@@ -629,112 +326,100 @@ chrome.fileManagerPrivate.selectFiles = function(selectedPaths, shouldReturnLoca
* @param {number} index * @param {number} index
* @param {boolean} forOpening * @param {boolean} forOpening
* @param {boolean} shouldReturnLocalPath * @param {boolean} shouldReturnLocalPath
* @param {function():void} callback Callback that does not take arguments. * @param {function()} callback Callback that does not take arguments.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-selectFile
*/ */
chrome.fileManagerPrivate.selectFile = function(selectedPath, index, forOpening, shouldReturnLocalPath, callback) {}; chrome.fileManagerPrivate.selectFile = function(selectedPath, index, forOpening,
shouldReturnLocalPath, callback) {};
/** /**
* Requests additional properties for files. |entries| list of entries |names| * Requests additional properties for files. |entries| list of entries of files
* list of requested properties by their names. |callback| Completion callback. * |callback|
* May return less than requested properties if some are not available. In * @param {!Array<!Entry>} entries
* the same time, it can return properties which were not requested (if it's * @param {!Array<string>} names
* cheap to compute them). * @param {function((!Array<!EntryProperties>|undefined))} callback
* @param {!Array<Object>} entries * |entryProperties| A dictionary containing properties of the requested
* @param {!Array<!chrome.fileManagerPrivate.EntryPropertyName>} names * entries.
* @param {function(!Array<!chrome.fileManagerPrivate.EntryProperties>):void}
* callback |entryProperties| A dictionary containing properties of the
* requested entries.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-getEntryProperties
*/ */
chrome.fileManagerPrivate.getEntryProperties = function(entries, names, callback) {}; chrome.fileManagerPrivate.getEntryProperties = function(entries, names,
callback) {};
/** /**
* Pins/unpins a Drive file in the cache. |entry| Entry to pin/unpin. |pin| Pass * Pins/unpins a Drive file in the cache. |entry| Entry of a file to pin/unpin.
* true to pin the file. |callback| Completion callback. * |pin| Pass true to pin the file. |callback| Completion callback.
* $(ref:runtime.lastError) will be set if there was an error. * $(ref:runtime.lastError) will be set if there was an error.
* @param {Object} entry * @param {!Entry} entry
* @param {boolean} pin * @param {boolean} pin
* @param {function():void} callback Callback that does not take arguments. * @param {function()} callback Callback that does not take arguments.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-pinDriveFile
*/ */
chrome.fileManagerPrivate.pinDriveFile = function(entry, pin, callback) {}; chrome.fileManagerPrivate.pinDriveFile = function(entry, pin, callback) {};
/** /**
* Resolves entries in the isolated file system and returns corresponding * Resolves file entries in the isolated file system and returns corresponding
* entries in the external file system mounted to Chrome OS file manager * entries in the external file system mounted to Chrome OS file manager
* backend. If resolving entry fails, the entry will be just ignored and the * backend. If resolving entry fails, the entry will be just ignored and the
* corresponding entry does not appear in the result. * corresponding entry does not appear in the result.
* @param {!Array<Object>} entries * @param {!Array<!Entry>} entries
* @param {function(!Array<Object>):void} callback |entries| External entries. * @param {function((!Array<!Entry>|undefined))} callback Completion callback
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-resolveIsolatedEntries * with resolved entries.
*/ */
chrome.fileManagerPrivate.resolveIsolatedEntries = function(entries, callback) {}; chrome.fileManagerPrivate.resolveIsolatedEntries = function(entries,
callback) {};
/** /**
* Mount a resource or a file. |source| Mount point source. For compressed files * Mount a resource or a file. |source| Mount point source. For compressed
* it is relative file path within external file system |callback| * files it is relative file path within external file system |callback|
* @param {string} source * @param {string} source
* @param {function(string):void} callback |sourcePath| Source path of the * @param {function((string|undefined))} callback Callback with source path of
* mount. * the mount.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-addMount
*/ */
chrome.fileManagerPrivate.addMount = function(source, callback) {}; chrome.fileManagerPrivate.addMount = function(source, callback) {};
/** /**
* Unmounts a mounted resource. |volumeId| An ID of the volume. * Unmounts a mounted resource. |volumeId| An ID of the volume.
* @param {string} volumeId * @param {string} volumeId
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-removeMount
*/ */
chrome.fileManagerPrivate.removeMount = function(volumeId) {}; chrome.fileManagerPrivate.removeMount = function(volumeId) {};
/** /**
* Get the list of mounted volumes. |callback| * Get the list of mounted volumes. |callback|
* @param {function(!Array<!chrome.fileManagerPrivate.VolumeMetadata>):void} * @param {function((!Array<!VolumeMetadata>|undefined))} callback Callback with
* callback |volumeMetadataList| The list of VolumeMetadata representing * the list of VolumeMetadata representing mounted volumes.
* mounted volumes.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-getVolumeMetadataList
*/ */
chrome.fileManagerPrivate.getVolumeMetadataList = function(callback) {}; chrome.fileManagerPrivate.getVolumeMetadataList = function(callback) {};
/** /**
* Cancels ongoing file transfers for selected files. |entries| Array of files * Cancels ongoing file transfers for selected files. |entries| Array of files
* for which ongoing transfer should be canceled. |callback| Completion callback * for which ongoing transfer should be canceled.
* of the cancel. * @param {!Array<!FileEntry>} entries
* @param {!Array<Object>} entries * @param {function()} callback
* @param {function():void} callback Callback that does not take arguments.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-cancelFileTransfers
*/ */
chrome.fileManagerPrivate.cancelFileTransfers = function(entries, callback) {}; chrome.fileManagerPrivate.cancelFileTransfers = function(entries, callback) {};
/** /**
* Cancels all ongoing file transfers. |callback| Completion callback of the * Cancels all ongoing file transfers.
* cancel. * @param {function()} callback
* @param {function():void} callback Callback that does not take arguments.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-cancelAllFileTransfers
*/ */
chrome.fileManagerPrivate.cancelAllFileTransfers = function(callback) {}; chrome.fileManagerPrivate.cancelAllFileTransfers = function(callback) {};
/** /**
* Starts to copy an entry. If the source is a directory, the copy is done * Starts to copy an entry. If the source is a directory, the copy is done
* recursively. |entry| Entry of the source entry to be copied. |parentEntry| * recursively. |entry| Entry of the source entry to be copied. |parent| Entry
* Entry for the destination (parent) directory. |newName| Name of the new * of the destination directory. |newName| Name of the new entry. It must not
* entry. It must not contain '/'. |callback| Completion callback. * contain '/'. |callback| Completion callback.
* @param {Object} entry * @param {!Entry} entry
* @param {Object} parentEntry * @param {!DirectoryEntry} parentEntry
* @param {string} newName * @param {string} newName
* @param {function(number):void} callback |copyId| ID of the copy task. Can be * @param {function((number|undefined))} callback |copyId| ID of the copy task.
* used to identify the progress, and to cancel the task. * Can be used to identify the progress, and to cancel the task.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-startCopy
*/ */
chrome.fileManagerPrivate.startCopy = function(entry, parentEntry, newName, callback) {}; chrome.fileManagerPrivate.startCopy = function(entry, parentEntry, newName,
callback) {};
/** /**
* Cancels the running copy task. |copyId| ID of the copy task to be cancelled. * Cancels the running copy task. |copyId| ID of the copy task to be cancelled.
* |callback| Completion callback of the cancel. * |callback| Completion callback of the cancel.
* @param {number} copyId * @param {number} copyId
* @param {function():void} callback Callback that does not take arguments. * @param {function()} callback Callback that does not take arguments.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-cancelCopy
*/ */
chrome.fileManagerPrivate.cancelCopy = function(copyId, callback) {}; chrome.fileManagerPrivate.cancelCopy = function(copyId, callback) {};
...@@ -742,105 +427,91 @@ chrome.fileManagerPrivate.cancelCopy = function(copyId, callback) {}; ...@@ -742,105 +427,91 @@ chrome.fileManagerPrivate.cancelCopy = function(copyId, callback) {};
* Retrieves total and remaining size of a mount point. |volumeId| ID of the * Retrieves total and remaining size of a mount point. |volumeId| ID of the
* volume to be checked. |callback| * volume to be checked. |callback|
* @param {string} volumeId * @param {string} volumeId
* @param {function(!chrome.fileManagerPrivate.MountPointSizeStats):void} * @param {function((!MountPointSizeStats|undefined))} callback Name/value pairs
* callback |sizeStats| Name/value pairs of size stats. Will be undefined if * of size stats. Will be undefined if stats could not be determined.
* stats could not be determined.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-getSizeStats
*/ */
chrome.fileManagerPrivate.getSizeStats = function(volumeId, callback) {}; chrome.fileManagerPrivate.getSizeStats = function(volumeId, callback) {};
/** /**
* Formats a mounted volume. |volumeId| ID of the volume to be formatted. * Formats a mounted volume. |volumeId| ID of the volume to be formatted.
* @param {string} volumeId * @param {string} volumeId
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-formatVolume
*/ */
chrome.fileManagerPrivate.formatVolume = function(volumeId) {}; chrome.fileManagerPrivate.formatVolume = function(volumeId) {};
/** /**
* Retrieves file manager preferences. |callback| * Retrieves file manager preferences. |callback|
* @param {function(!chrome.fileManagerPrivate.Preferences):void} callback * @param {function((!Preferences|undefined))} callback
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-getPreferences
*/ */
chrome.fileManagerPrivate.getPreferences = function(callback) {}; chrome.fileManagerPrivate.getPreferences = function(callback) {};
/** /**
* Sets file manager preferences. |changeInfo| * Sets file manager preferences. |changeInfo|
* @param {!chrome.fileManagerPrivate.PreferencesChange} changeInfo * @param {PreferencesChange} changeInfo
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-setPreferences
*/ */
chrome.fileManagerPrivate.setPreferences = function(changeInfo) {}; chrome.fileManagerPrivate.setPreferences = function(changeInfo) {};
/** /**
* Performs drive content search. |searchParams| |callback| * Performs drive content search. |searchParams| |callback|
* @param {!chrome.fileManagerPrivate.SearchParams} searchParams * @param {SearchParams} searchParams
* @param {function(!Array<Object>, string):void} callback |entries| |nextFeed| * @param {function((!Array<Entry>|undefined), (string|undefined))} callback
* ID of the feed that contains next chunk of the search result. Should * Entries and ID of the feed that contains next chunk of the search result.
* be sent to the next searchDrive request to perform incremental * Should be sent to the next searchDrive request to perform incremental search.
* search.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-searchDrive
*/ */
chrome.fileManagerPrivate.searchDrive = function(searchParams, callback) {}; chrome.fileManagerPrivate.searchDrive = function(searchParams, callback) {};
/** /**
* Performs drive metadata search. |searchParams| |callback| * Performs drive metadata search. |searchParams| |callback|
* @param {!chrome.fileManagerPrivate.SearchMetadataParams} searchParams * @param {SearchMetadataParams} searchParams
* @param {function(!Array<!chrome.fileManagerPrivate.SearchResult>):void} * @param {function((!Array<!SearchResult>|undefined))} callback
* callback
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-searchDriveMetadata
*/ */
chrome.fileManagerPrivate.searchDriveMetadata = function(searchParams, callback) {}; chrome.fileManagerPrivate.searchDriveMetadata = function(searchParams,
callback) {};
/** /**
* Search files in the volume having |volumeId| by using |hashList|. * Search for files in the given volume, whose content hash matches the list of
* sub-directories) the given |targetDirectoryUrl|. * given hashes.
* @param {string} volumeId * @param {string} volumeId
* @param {!Array<string>} hashList * @param {!Array<string>} hashes
* @param {function(Object):void} callback |urls| The map of hash and array of * @param {function((!Object<string, !Array<string>>|undefined))} callback
* FileEntry's URL. The array can be empty if the corresponding file is not
* found.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-searchFilesByHashes
*/ */
chrome.fileManagerPrivate.searchFilesByHashes = function(volumeId, hashList, callback) {}; chrome.fileManagerPrivate.searchFilesByHashes = function(volumeId, hashes,
callback) {};
/** /**
* Create a zip file for the selected files. |parentEntry| Entry of the * Create a zip file for the selected files. |parentEntry| Entry of the
* directory containing the selected files. |entries| Entries of the selected * directory containing the selected files. |entries| Selected entries.
* files. The files must be under the directory specified by |parentEntry|. * The files must be under the directory specified by |parentEntry|. |destName|
* |destName| Name of the destination zip file. The zip file will be created * Name of the destination zip file. The zip file will be created under the
* under the directory specified by |parentEntry|. |callback| TODO(mtomasz): * directory specified by |parentEntry|.
* Swap order of |entries| and |parentEntry|. * @param {!DirectoryEntry} parentEntry
* @param {Object} parentEntry * @param {!Array<!Entry>} entries
* @param {!Array<Object>} entries
* @param {string} destName * @param {string} destName
* @param {function(boolean):void} callback * @param {function((boolean|undefined))} callback
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-zipSelection
*/ */
chrome.fileManagerPrivate.zipSelection = function(parentEntry, entries, destName, callback) {}; chrome.fileManagerPrivate.zipSelection = function(parentEntry, entries,
destName, callback) {};
/** /**
* Retrieves the state of the current drive connection. |callback| * Retrieves the state of the current drive connection. |callback|
* @param {function(!chrome.fileManagerPrivate.DriveConnectionState):void} * @param {function((!DriveConnectionState|undefined))} callback
* callback
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-getDriveConnectionState
*/ */
chrome.fileManagerPrivate.getDriveConnectionState = function(callback) {}; chrome.fileManagerPrivate.getDriveConnectionState = function(callback) {};
/** /**
* Checks whether the path name length fits in the limit of the filesystem. * Checks whether the path name length fits in the limit of the filesystem.
* |parentEntry| The entry of the parent directory entry. |name| The name of the * |parentEntry| The parent directory entry. |name| The name of the file.
* file. |callback| Called back when the check is finished. * |callback| Called back when the check is finished.
* @param {Object} parentEntry * @param {!DirectoryEntry} parentEntry
* @param {string} name * @param {string} name
* @param {function(boolean):void} callback |result| true if the length is in * @param {function((boolean|undefined))} callback |result| true if the length
* the valid range, false otherwise. * is in the valid range, false otherwise.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-validatePathNameLength
*/ */
chrome.fileManagerPrivate.validatePathNameLength = function(parentEntry, name, callback) {}; chrome.fileManagerPrivate.validatePathNameLength = function(
parentEntry, name, callback) {};
/** /**
* Changes the zoom factor of the Files.app. |operation| Zooming mode. * Changes the zoom factor of the Files.app. |operation| Zooming mode.
* @param {!chrome.fileManagerPrivate.ZoomOperationType} operation * @param {string} operation
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-zoom
*/ */
chrome.fileManagerPrivate.zoom = function(operation) {}; chrome.fileManagerPrivate.zoom = function(operation) {};
...@@ -848,207 +519,186 @@ chrome.fileManagerPrivate.zoom = function(operation) {}; ...@@ -848,207 +519,186 @@ chrome.fileManagerPrivate.zoom = function(operation) {};
* Requests a Drive API OAuth2 access token. |refresh| Whether the token should * Requests a Drive API OAuth2 access token. |refresh| Whether the token should
* be refetched instead of using the cached one. |callback| * be refetched instead of using the cached one. |callback|
* @param {boolean} refresh * @param {boolean} refresh
* @param {function(string):void} callback |accessToken| OAuth2 access token, or * @param {function((string|undefined))} callback |accessToken| OAuth2 access
* an empty string if failed to fetch. * token, or an empty string if failed to fetch.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-requestAccessToken
*/ */
chrome.fileManagerPrivate.requestAccessToken = function(refresh, callback) {}; chrome.fileManagerPrivate.requestAccessToken = function(refresh, callback) {};
/** /**
* Requests a Webstore API OAuth2 access token. |callback| * Requests a Webstore API OAuth2 access token. |callback|
* @param {function(string):void} callback |accessToken| OAuth2 access token, or * @param {function((string|undefined))} callback |accessToken| OAuth2 access
* an empty string if failed to fetch. * token, or an empty string if failed to fetch.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-requestWebStoreAccessToken
*/ */
chrome.fileManagerPrivate.requestWebStoreAccessToken = function(callback) {}; chrome.fileManagerPrivate.requestWebStoreAccessToken = function(callback) {};
/** /**
* Requests a share dialog url for the specified file. |entry| The entry to * Requests a share dialog url for the specified file.
* share. |callback| * @param {!Entry} entry
* @param {Object} entry * @param {function((string|undefined))} callback Callback with the result url.
* @param {function(string):void} callback |url| Result url.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-getShareUrl
*/ */
chrome.fileManagerPrivate.getShareUrl = function(entry, callback) {}; chrome.fileManagerPrivate.getShareUrl = function(entry, callback) {};
/** /**
* Requests a download url to download the file contents. |entry| The entry to * Requests a download url to download the file contents.
* download. |callback| * @param {!Entry} entry
* @param {Object} entry * @param {function((string|undefined))} callback Callback with the result url.
* @param {function(string):void} callback |url| Result url.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-getDownloadUrl
*/ */
chrome.fileManagerPrivate.getDownloadUrl = function(entry, callback) {}; chrome.fileManagerPrivate.getDownloadUrl = function(entry, callback) {};
/** /**
* Requests to share drive files. |entry| Entry to be shared. |shareType| Type * Requests to share drive files.
* of access that is getting granted. * @param {!Entry} entry
* @param {Object} entry * @param {string} shareType
* @param {!chrome.fileManagerPrivate.DriveShareType} shareType * @param {function()} callback Callback that does not take arguments.
* @param {function():void} callback Callback that does not take arguments.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-requestDriveShare
*/ */
chrome.fileManagerPrivate.requestDriveShare = function(entry, shareType, callback) {}; chrome.fileManagerPrivate.requestDriveShare = function(entry, shareType,
callback) {};
/**
* 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|
* @param {string} itemId
* @param {boolean} silentInstallation
* @param {function()} callback Callback that does not take arguments.
*/
chrome.fileManagerPrivate.installWebstoreItem = function(itemId,
silentInstallation, callback) {};
/** /**
* Obtains a list of profiles that are logged-in. * Obtains a list of profiles that are logged-in.
* @param {function(!Array<!chrome.fileManagerPrivate.ProfileInfo>, string, string):void} * @param {function((!Array<!ProfileInfo>|undefined), (string|undefined),
* callback |profiles| List of profile information. |runningProfile| ID of * (string|undefined))} callback Callback with list of profile information,
* the profile that runs the application instance. |showingProfile| ID of * |runningProfile| ID of the profile that runs the application instance.
* the profile that shows the application window. * |showingProfile| ID of the profile that shows the application window.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-getProfiles
*/ */
chrome.fileManagerPrivate.getProfiles = function(callback) {}; chrome.fileManagerPrivate.getProfiles = function(callback) {};
/** /**
* Opens inspector window. |type| InspectionType which specifies how to open * Opens inspector window. |type| InspectionType which specifies how to open
* inspector. * inspector.
* @param {!chrome.fileManagerPrivate.InspectionType} type * @param {string} type
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-openInspector
*/ */
chrome.fileManagerPrivate.openInspector = function(type) {}; chrome.fileManagerPrivate.openInspector = function(type) {};
/** /**
* Computes an MD5 checksum for the given file. |entry| The entry of the file to * Computes an MD5 checksum for the given file.
* checksum. |callback| * @param {!Entry} entry
* @param {Object} entry * @param {function((string|undefined))} callback
* @param {function(string):void} callback |checksum| Result checksum.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-computeChecksum
*/ */
chrome.fileManagerPrivate.computeChecksum = function(entry, callback) {}; chrome.fileManagerPrivate.computeChecksum = function(entry, callback) {};
/** /**
* Is UMA enabled? * Gets the MIME type of a file.
* @param {function(boolean):void} callback |result| Boolean result returned by * @param {!Entry} entry
* the invoked function. * @param {function((string|undefined))} callback Callback that MIME type of the
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-isUMAEnabled * file is passed.
*/
chrome.fileManagerPrivate.getMimeType = function(entry, callback) {};
/**
* Gets a flag indicating whether user metrics reporting is enabled.
* @param {function((boolean|undefined))} callback
*/ */
chrome.fileManagerPrivate.isUMAEnabled = function(callback) {}; chrome.fileManagerPrivate.isUMAEnabled = function(callback) {};
/** /**
* Sets a tag on a file or a directory. Only Drive files are supported. * Sets a tag on a file or a directory. Only Drive files are supported.
* @param {Object} entry * @param {!Entry} entry
* @param {!chrome.fileManagerPrivate.EntryTagVisibility} visibility * @param {string} visibility 'private' or 'public'
* @param {string} key * @param {string} key
* @param {string} value * @param {string} value
* @param {function():void} callback Callback that does not take arguments. * @param {function()} callback
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-setEntryTag
*/ */
chrome.fileManagerPrivate.setEntryTag = function(entry, visibility, key, value, callback) {}; chrome.fileManagerPrivate.setEntryTag = function(entry, visibility, key,
value, callback) {};
/** /**
* Returns if Piex loader is enabled. * Gets a flag indicating whether PiexLoader is enabled.
* @param {function(boolean):void} callback |result| Boolean result returned by * @param {function((boolean|undefined))} callback
* the invoked function.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-isPiexLoaderEnabled
*/ */
chrome.fileManagerPrivate.isPiexLoaderEnabled = function(callback) {}; chrome.fileManagerPrivate.isPiexLoaderEnabled = function(callback) {};
/** /**
* Returns list of available providing extensions. * Returns list of available providing extensions.
* @param {function(!Array<!chrome.fileManagerPrivate.ProvidingExtension>):void} * @param {function((!Array<!ProvidingExtension>|undefined))} callback
* callback |extensions| List of providing extensions.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-getProvidingExtensions
*/ */
chrome.fileManagerPrivate.getProvidingExtensions = function(callback) {}; chrome.fileManagerPrivate.getProvidingExtensions = function(callback) {};
/** /**
* Requests adding a new provided file system. If not possible, then an error * Requests adding a new provided file system. If not possible, then an error
* via chrome.runtime.lastError is returned. * via chrome.runtime.lastError is returned.
* @param {string} extension_id * @param {string} extensionId
* @param {function():void} callback Callback that does not take arguments. * @param {function()} callback
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-addProvidedFileSystem
*/ */
chrome.fileManagerPrivate.addProvidedFileSystem = function(extension_id, callback) {}; chrome.fileManagerPrivate.addProvidedFileSystem =
function(extensionId, callback) {};
/** /**
* Requests configuring an existing volume. If not possible, then returns an * Requests configuring an existing file system. If not possible, then returns
* error via chrome.runtime.lastError. * an error via chrome.runtime.lastError.
* @param {string} volumeId * @param {string} volumeId
* @param {function():void} callback Callback that does not take arguments. * @param {function()} callback
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-configureVolume
*/ */
chrome.fileManagerPrivate.configureVolume = function(volumeId, callback) {}; chrome.fileManagerPrivate.configureVolume = function(volumeId, callback) {};
/** /**
* Requests list of custom actions for the specified entries. If not possible, * Requests fetching list of actions for the specified set of entries. If not
* then an error via chrome.runtime.lastError is returned. * possible, then returns an error via chrome.runtime.lastError.
* @param {!Array<Object>} entries * @param {!Array<!Entry>} entries
* @param {function(!Array<!chrome.fileManagerPrivate.fileSystemProvider.Action>):void} * @param {function((!Array<!EntryAction>|undefined))} callback
* callback |actions| List of actions.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-getCustomActions
*/ */
chrome.fileManagerPrivate.getCustomActions = function(entries, callback) {}; chrome.fileManagerPrivate.getCustomActions = function(entries, callback) {};
/**
* Executes a custom action for a set of entries. If not possible, then an error
* via chrome.runtime.lastError is returned.
* @param {!Array<Object>} entries
* @param {string} actionId
* @param {function():void} callback Callback that does not take arguments.
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-executeCustomAction
*/
chrome.fileManagerPrivate.executeCustomAction = function(entries, actionId, callback) {};
/** /**
* Get the total size of a directory. |entry| Entry of the target directory. * Get the total size of a directory. |entry| Entry of the target directory.
* |callback| * |callback|
* @param {Object} entry * @param {!DirectoryEntry} entry
* @param {function(number):void} callback |size| result size. * @param {function(number)} callback
* @see https://developer.chrome.com/extensions/fileManagerPrivate#method-getDirectorySize
*/ */
chrome.fileManagerPrivate.getDirectorySize = function(entry, callback) {}; chrome.fileManagerPrivate.getDirectorySize = function(entry, callback) {};
/** /**
* @type {!ChromeEvent} * Executes the action on the specified set of entries. If not possible, then
* @see https://developer.chrome.com/extensions/fileManagerPrivate#event-onMountCompleted * returns an error via chrome.runtime.lastError.
* @param {!Array<!Entry>} entries
* @param {string} actionId
* @param {function()} callback
*/ */
chrome.fileManagerPrivate.executeCustomAction = function(
entries, actionId, callback) {};
/** @type {!ChromeEvent} */
chrome.fileManagerPrivate.onMountCompleted; chrome.fileManagerPrivate.onMountCompleted;
/** /** @type {!ChromeEvent} */
* @type {!ChromeEvent}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#event-onFileTransfersUpdated
*/
chrome.fileManagerPrivate.onFileTransfersUpdated; chrome.fileManagerPrivate.onFileTransfersUpdated;
/** /** @type {!ChromeEvent} */
* @type {!ChromeEvent}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#event-onCopyProgress
*/
chrome.fileManagerPrivate.onCopyProgress; chrome.fileManagerPrivate.onCopyProgress;
/** /** @type {!ChromeEvent} */
* @type {!ChromeEvent}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#event-onDirectoryChanged
*/
chrome.fileManagerPrivate.onDirectoryChanged; chrome.fileManagerPrivate.onDirectoryChanged;
/** /** @type {!ChromeEvent} */
* @type {!ChromeEvent}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#event-onPreferencesChanged
*/
chrome.fileManagerPrivate.onPreferencesChanged; chrome.fileManagerPrivate.onPreferencesChanged;
/** /** @type {!ChromeEvent} */
* @type {!ChromeEvent}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#event-onDriveConnectionStatusChanged
*/
chrome.fileManagerPrivate.onDriveConnectionStatusChanged; chrome.fileManagerPrivate.onDriveConnectionStatusChanged;
/** /** @type {!ChromeEvent} */
* @type {!ChromeEvent}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#event-onDeviceChanged
*/
chrome.fileManagerPrivate.onDeviceChanged; chrome.fileManagerPrivate.onDeviceChanged;
/** /** @type {!ChromeEvent} */
* @type {!ChromeEvent}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#event-onDriveSyncError
*/
chrome.fileManagerPrivate.onDriveSyncError; chrome.fileManagerPrivate.onDriveSyncError;
/** /** @type {!ChromeEvent} */
* @type {!ChromeEvent}
* @see https://developer.chrome.com/extensions/fileManagerPrivate#event-onAppsUpdated
*/
chrome.fileManagerPrivate.onAppsUpdated; chrome.fileManagerPrivate.onAppsUpdated;
/** @enum {string} */
chrome.fileManagerPrivate.Verb = {
OPEN_WITH: 'open_with',
ADD_TO: 'add_to',
PACK_WITH: 'pack_with',
SHARE_WITH: 'share_with',
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment