Commit 7a8e9588 authored by Nigel Tao's avatar Nigel Tao Committed by Commit Bot

Namespace file_manager_private.js declarations

This brings the (still hand-written) externs/file_manager_private.js
file closer to what tools/json_schema_compiler/compiler.py generates.

Test: "ninja ui/file_manager:closure_compile" runs without error
Bug: 613096
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ib3dfdddd9a6b9c0d67d143f89a5f9348eaecb4ae
Reviewed-on: https://chromium-review.googlesource.com/1088345Reviewed-by: default avatarSasha Morrissey <sashab@chromium.org>
Commit-Queue: Nigel Tao <nigeltao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565095}
parent c0295ffb
...@@ -32,7 +32,7 @@ chrome.fileManagerPrivate.SourceRestriction = { ...@@ -32,7 +32,7 @@ chrome.fileManagerPrivate.SourceRestriction = {
* isDefault: boolean * isDefault: boolean
* }} * }}
*/ */
var FileTask; chrome.fileManagerPrivate.FileTask;
/** /**
* @typedef {{ * @typedef {{
...@@ -59,7 +59,7 @@ var FileTask; ...@@ -59,7 +59,7 @@ var FileTask;
* shareUrl: (string|undefined) * shareUrl: (string|undefined)
* }} * }}
*/ */
var EntryProperties; chrome.fileManagerPrivate.EntryProperties;
/** /**
* @typedef {{ * @typedef {{
...@@ -67,7 +67,7 @@ var EntryProperties; ...@@ -67,7 +67,7 @@ var EntryProperties;
* remainingSize: number * remainingSize: number
* }} * }}
*/ */
var MountPointSizeStats; chrome.fileManagerPrivate.MountPointSizeStats;
/** /**
* @typedef {{ * @typedef {{
...@@ -76,7 +76,7 @@ var MountPointSizeStats; ...@@ -76,7 +76,7 @@ var MountPointSizeStats;
* isCurrentProfile: boolean * isCurrentProfile: boolean
* }} * }}
*/ */
var ProfileInfo; chrome.fileManagerPrivate.ProfileInfo;
/** /**
* @typedef {{ * @typedef {{
...@@ -84,7 +84,7 @@ var ProfileInfo; ...@@ -84,7 +84,7 @@ var ProfileInfo;
* icon32x32Url: (string|undefined) * icon32x32Url: (string|undefined)
* }} * }}
*/ */
var IconSet; chrome.fileManagerPrivate.IconSet;
/** /**
* @typedef {{ * @typedef {{
...@@ -92,7 +92,7 @@ var IconSet; ...@@ -92,7 +92,7 @@ var IconSet;
* fileSystemId: (string|undefined), * fileSystemId: (string|undefined),
* source: string, * source: string,
* volumeLabel: (string|undefined), * volumeLabel: (string|undefined),
* profile: ProfileInfo, * profile: chrome.fileManagerPrivate.ProfileInfo,
* sourcePath: (string|undefined), * sourcePath: (string|undefined),
* volumeType: string, * volumeType: string,
* deviceType: (string|undefined), * deviceType: (string|undefined),
...@@ -106,20 +106,20 @@ var IconSet; ...@@ -106,20 +106,20 @@ var IconSet;
* mountCondition: (string|undefined), * mountCondition: (string|undefined),
* mountContext: (string|undefined), * mountContext: (string|undefined),
* diskFileSystemType: (string|undefined), * diskFileSystemType: (string|undefined),
* iconSet: IconSet * iconSet: chrome.fileManagerPrivate.IconSet
* }} * }}
*/ */
var VolumeMetadata; chrome.fileManagerPrivate.VolumeMetadata;
/** /**
* @typedef {{ * @typedef {{
* eventType: string, * eventType: string,
* status: string, * status: string,
* volumeMetadata: VolumeMetadata, * volumeMetadata: chrome.fileManagerPrivate.VolumeMetadata,
* shouldNotify: boolean * shouldNotify: boolean
* }} * }}
*/ */
var MountCompletedEvent; chrome.fileManagerPrivate.MountCompletedEvent;
/** /**
* @typedef {{ * @typedef {{
...@@ -131,7 +131,7 @@ var MountCompletedEvent; ...@@ -131,7 +131,7 @@ var MountCompletedEvent;
* hideWhenZeroJobs: boolean * hideWhenZeroJobs: boolean
* }} * }}
*/ */
var FileTransferStatus; chrome.fileManagerPrivate.FileTransferStatus;
/** /**
* @typedef {{ * @typedef {{
...@@ -139,7 +139,7 @@ var FileTransferStatus; ...@@ -139,7 +139,7 @@ var FileTransferStatus;
* fileUrl: string * fileUrl: string
* }} * }}
*/ */
var DriveSyncErrorEvent; chrome.fileManagerPrivate.DriveSyncErrorEvent;
/** /**
* @typedef {{ * @typedef {{
...@@ -150,7 +150,7 @@ var DriveSyncErrorEvent; ...@@ -150,7 +150,7 @@ var DriveSyncErrorEvent;
* error: (string|undefined) * error: (string|undefined)
* }} * }}
*/ */
var CopyProgressStatus; chrome.fileManagerPrivate.CopyProgressStatus;
/** /**
* @typedef {{ * @typedef {{
...@@ -158,7 +158,7 @@ var CopyProgressStatus; ...@@ -158,7 +158,7 @@ var CopyProgressStatus;
* changes: Array * changes: Array
* }} * }}
*/ */
var FileChange; chrome.fileManagerPrivate.FileChange;
/** /**
* @typedef {{ * @typedef {{
...@@ -167,7 +167,7 @@ var FileChange; ...@@ -167,7 +167,7 @@ var FileChange;
* changedFiles: (Array|undefined) * changedFiles: (Array|undefined)
* }} * }}
*/ */
var FileWatchEvent; chrome.fileManagerPrivate.FileWatchEvent;
/** /**
* @typedef {{ * @typedef {{
...@@ -180,7 +180,7 @@ var FileWatchEvent; ...@@ -180,7 +180,7 @@ var FileWatchEvent;
* timezone: string * timezone: string
* }} * }}
*/ */
var Preferences; chrome.fileManagerPrivate.Preferences;
/** /**
* @typedef {{ * @typedef {{
...@@ -188,7 +188,7 @@ var Preferences; ...@@ -188,7 +188,7 @@ var Preferences;
* hostedFilesDisabled: (boolean|undefined) * hostedFilesDisabled: (boolean|undefined)
* }} * }}
*/ */
var PreferencesChange; chrome.fileManagerPrivate.PreferencesChange;
/** /**
* @typedef {{ * @typedef {{
...@@ -196,7 +196,7 @@ var PreferencesChange; ...@@ -196,7 +196,7 @@ var PreferencesChange;
* nextFeed: string * nextFeed: string
* }} * }}
*/ */
var SearchParams; chrome.fileManagerPrivate.SearchParams;
/** /**
* @typedef {{ * @typedef {{
...@@ -205,7 +205,7 @@ var SearchParams; ...@@ -205,7 +205,7 @@ var SearchParams;
* maxResults: number * maxResults: number
* }} * }}
*/ */
var SearchMetadataParams; chrome.fileManagerPrivate.SearchMetadataParams;
/** /**
* @typedef {{ * @typedef {{
...@@ -213,7 +213,7 @@ var SearchMetadataParams; ...@@ -213,7 +213,7 @@ var SearchMetadataParams;
* highlightedBaseName: string * highlightedBaseName: string
* }} * }}
*/ */
var SearchResult; chrome.fileManagerPrivate.SearchResult;
/** /**
* @typedef {{ * @typedef {{
...@@ -221,7 +221,7 @@ var SearchResult; ...@@ -221,7 +221,7 @@ var SearchResult;
* reason: (string|undefined) * reason: (string|undefined)
* }} * }}
*/ */
var DriveConnectionState; chrome.fileManagerPrivate.DriveConnectionState;
/** /**
* @typedef {{ * @typedef {{
...@@ -229,12 +229,12 @@ var DriveConnectionState; ...@@ -229,12 +229,12 @@ var DriveConnectionState;
* devicePath: string * devicePath: string
* }} * }}
*/ */
var DeviceEvent; chrome.fileManagerPrivate.DeviceEvent;
/** /**
* @typedef {{ * @typedef {{
* providerId: string, * providerId: string,
* iconSet: IconSet, * iconSet: chrome.fileManagerPrivate.IconSet,
* name: string, * name: string,
* configurable: boolean, * configurable: boolean,
* watchable: boolean, * watchable: boolean,
...@@ -242,7 +242,7 @@ var DeviceEvent; ...@@ -242,7 +242,7 @@ var DeviceEvent;
* source: string * source: string
* }} * }}
*/ */
var Provider; chrome.fileManagerPrivate.Provider;
/** /**
* Logout the current user for navigating to the re-authentication screen for * Logout the current user for navigating to the re-authentication screen for
...@@ -283,7 +283,7 @@ chrome.fileManagerPrivate.setDefaultTask = function(taskId, entries, mimeTypes, ...@@ -283,7 +283,7 @@ chrome.fileManagerPrivate.setDefaultTask = function(taskId, entries, mimeTypes,
* 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<!Entry>} entries * @param {!Array<!Entry>} entries
* @param {function((!Array<!FileTask>|undefined))} callback |tasks| The list of * @param {function((!Array<!chrome.fileManagerPrivate.FileTask>|undefined))} callback |tasks| The list of
* matched file entries for this task. * matched file entries for this task.
*/ */
chrome.fileManagerPrivate.getFileTasks = function(entries, callback) {}; chrome.fileManagerPrivate.getFileTasks = function(entries, callback) {};
...@@ -364,7 +364,7 @@ chrome.fileManagerPrivate.selectFile = function(selectedPath, index, forOpening, ...@@ -364,7 +364,7 @@ chrome.fileManagerPrivate.selectFile = function(selectedPath, index, forOpening,
* |callback| * |callback|
* @param {!Array<!Entry>} entries * @param {!Array<!Entry>} entries
* @param {!Array<string>} names * @param {!Array<string>} names
* @param {function((!Array<!EntryProperties>|undefined))} callback * @param {function((!Array<!chrome.fileManagerPrivate.EntryProperties>|undefined))} callback
* |entryProperties| A dictionary containing properties of the requested * |entryProperties| A dictionary containing properties of the requested
* entries. * entries.
*/ */
...@@ -437,8 +437,9 @@ chrome.fileManagerPrivate.markCacheAsMounted = function( ...@@ -437,8 +437,9 @@ chrome.fileManagerPrivate.markCacheAsMounted = function(
/** /**
* Get the list of mounted volumes. |callback| * Get the list of mounted volumes. |callback|
* @param {function((!Array<!VolumeMetadata>|undefined))} callback Callback with * @param {function((!Array<!chrome.fileManagerPrivate.VolumeMetadata>|undefined))} callback Callback with
* the list of VolumeMetadata representing mounted volumes. * the list of chrome.fileManagerPrivate.VolumeMetadata representing mounted
* volumes.
*/ */
chrome.fileManagerPrivate.getVolumeMetadataList = function(callback) {}; chrome.fileManagerPrivate.getVolumeMetadataList = function(callback) {};
...@@ -482,7 +483,7 @@ chrome.fileManagerPrivate.cancelCopy = function(copyId, callback) {}; ...@@ -482,7 +483,7 @@ 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((!MountPointSizeStats|undefined))} callback Name/value pairs * @param {function((!chrome.fileManagerPrivate.MountPointSizeStats|undefined))} callback Name/value pairs
* of size stats. Will be undefined if stats could not be determined. * of size stats. Will be undefined if stats could not be determined.
*/ */
chrome.fileManagerPrivate.getSizeStats = function(volumeId, callback) {}; chrome.fileManagerPrivate.getSizeStats = function(volumeId, callback) {};
...@@ -503,19 +504,19 @@ chrome.fileManagerPrivate.renameVolume = function(volumeId, newName) {}; ...@@ -503,19 +504,19 @@ chrome.fileManagerPrivate.renameVolume = function(volumeId, newName) {};
/** /**
* Retrieves file manager preferences. |callback| * Retrieves file manager preferences. |callback|
* @param {function((!Preferences|undefined))} callback * @param {function((!chrome.fileManagerPrivate.Preferences|undefined))} callback
*/ */
chrome.fileManagerPrivate.getPreferences = function(callback) {}; chrome.fileManagerPrivate.getPreferences = function(callback) {};
/** /**
* Sets file manager preferences. |changeInfo| * Sets file manager preferences. |changeInfo|
* @param {PreferencesChange} changeInfo * @param {chrome.fileManagerPrivate.PreferencesChange} changeInfo
*/ */
chrome.fileManagerPrivate.setPreferences = function(changeInfo) {}; chrome.fileManagerPrivate.setPreferences = function(changeInfo) {};
/** /**
* Performs drive content search. |searchParams| |callback| * Performs drive content search. |searchParams| |callback|
* @param {SearchParams} searchParams * @param {chrome.fileManagerPrivate.SearchParams} searchParams
* @param {function((!Array<Entry>|undefined), (string|undefined))} callback * @param {function((!Array<Entry>|undefined), (string|undefined))} callback
* Entries and ID of the feed that contains next chunk of the search result. * Entries and ID of the feed that contains next chunk of the search result.
* Should be sent to the next searchDrive request to perform incremental search. * Should be sent to the next searchDrive request to perform incremental search.
...@@ -524,8 +525,8 @@ chrome.fileManagerPrivate.searchDrive = function(searchParams, callback) {}; ...@@ -524,8 +525,8 @@ chrome.fileManagerPrivate.searchDrive = function(searchParams, callback) {};
/** /**
* Performs drive metadata search. |searchParams| |callback| * Performs drive metadata search. |searchParams| |callback|
* @param {SearchMetadataParams} searchParams * @param {chrome.fileManagerPrivate.SearchMetadataParams} searchParams
* @param {function((!Array<!SearchResult>|undefined))} callback * @param {function((!Array<!chrome.fileManagerPrivate.SearchResult>|undefined))} callback
*/ */
chrome.fileManagerPrivate.searchDriveMetadata = function(searchParams, chrome.fileManagerPrivate.searchDriveMetadata = function(searchParams,
callback) {}; callback) {};
...@@ -556,7 +557,7 @@ chrome.fileManagerPrivate.zipSelection = function(entries, parentEntry, ...@@ -556,7 +557,7 @@ chrome.fileManagerPrivate.zipSelection = function(entries, parentEntry,
/** /**
* Retrieves the state of the current drive connection. |callback| * Retrieves the state of the current drive connection. |callback|
* @param {function((!DriveConnectionState|undefined))} callback * @param {function((!chrome.fileManagerPrivate.DriveConnectionState|undefined))} callback
*/ */
chrome.fileManagerPrivate.getDriveConnectionState = function(callback) {}; chrome.fileManagerPrivate.getDriveConnectionState = function(callback) {};
...@@ -619,7 +620,7 @@ chrome.fileManagerPrivate.requestDriveShare = function(entry, shareType, ...@@ -619,7 +620,7 @@ chrome.fileManagerPrivate.requestDriveShare = function(entry, shareType,
/** /**
* Obtains a list of profiles that are logged-in. * Obtains a list of profiles that are logged-in.
* @param {function((!Array<!ProfileInfo>|undefined), (string|undefined), * @param {function((!Array<!chrome.fileManagerPrivate.ProfileInfo>|undefined), (string|undefined),
* (string|undefined))} callback Callback with list of profile information, * (string|undefined))} callback Callback with list of profile information,
* |runningProfile| ID of the profile that runs the application instance. * |runningProfile| ID of the profile that runs the application instance.
* |showingProfile| ID of the profile that shows the application window. * |showingProfile| ID of the profile that shows the application window.
...@@ -671,7 +672,7 @@ chrome.fileManagerPrivate.isPiexLoaderEnabled = function(callback) {}; ...@@ -671,7 +672,7 @@ chrome.fileManagerPrivate.isPiexLoaderEnabled = function(callback) {};
/** /**
* Returns list of available providers. * Returns list of available providers.
* @param {function((!Array<!Provider>|undefined))} callback * @param {function((!Array<!chrome.fileManagerPrivate.Provider>|undefined))} callback
*/ */
chrome.fileManagerPrivate.getProviders = function(callback) {}; chrome.fileManagerPrivate.getProviders = function(callback) {};
......
...@@ -81,7 +81,7 @@ VolumeInfo.prototype.providerId; ...@@ -81,7 +81,7 @@ VolumeInfo.prototype.providerId;
/** /**
* Set of icons for this volume. * Set of icons for this volume.
* @type {!IconSet} * @type {!chrome.fileManagerPrivate.IconSet}
*/ */
VolumeInfo.prototype.iconSet; VolumeInfo.prototype.iconSet;
......
...@@ -285,7 +285,7 @@ DeviceHandler.Notification.prototype.makeId_ = function(devicePath) { ...@@ -285,7 +285,7 @@ DeviceHandler.Notification.prototype.makeId_ = function(devicePath) {
/** /**
* Handles notifications from C++ sides. * Handles notifications from C++ sides.
* @param {DeviceEvent} event Device event. * @param {chrome.fileManagerPrivate.DeviceEvent} event Device event.
* @private * @private
*/ */
DeviceHandler.prototype.onDeviceChanged_ = function(event) { DeviceHandler.prototype.onDeviceChanged_ = function(event) {
...@@ -295,7 +295,7 @@ DeviceHandler.prototype.onDeviceChanged_ = function(event) { ...@@ -295,7 +295,7 @@ DeviceHandler.prototype.onDeviceChanged_ = function(event) {
}; };
/** /**
* @param {DeviceEvent} event Device event. * @param {chrome.fileManagerPrivate.DeviceEvent} event Device event.
* @private * @private
*/ */
DeviceHandler.prototype.onDeviceChangedInternal_ = function(event) { DeviceHandler.prototype.onDeviceChangedInternal_ = function(event) {
...@@ -357,7 +357,8 @@ Object.freeze(DeviceHandler.MountStatus); ...@@ -357,7 +357,8 @@ Object.freeze(DeviceHandler.MountStatus);
/** /**
* Handles mount completed events to show notifications for removable devices. * Handles mount completed events to show notifications for removable devices.
* @param {MountCompletedEvent} event Mount completed event. * @param {chrome.fileManagerPrivate.MountCompletedEvent} event Mount completed
* event.
* @private * @private
*/ */
DeviceHandler.prototype.onMountCompleted_ = function(event) { DeviceHandler.prototype.onMountCompleted_ = function(event) {
...@@ -468,7 +469,7 @@ DeviceHandler.prototype.onMountCompletedInternal_ = function(event) { ...@@ -468,7 +469,7 @@ DeviceHandler.prototype.onMountCompletedInternal_ = function(event) {
/** /**
* Handles mount events. * Handles mount events.
* @param {MountCompletedEvent} event * @param {chrome.fileManagerPrivate.MountCompletedEvent} event
* @private * @private
*/ */
DeviceHandler.prototype.onMount_ = function(event) { DeviceHandler.prototype.onMount_ = function(event) {
......
...@@ -134,7 +134,7 @@ DriveSyncHandler.prototype.showDisabledMobileSyncNotification = function() { ...@@ -134,7 +134,7 @@ DriveSyncHandler.prototype.showDisabledMobileSyncNotification = function() {
/** /**
* Handles file transfer updated events. * Handles file transfer updated events.
* @param {FileTransferStatus} status Transfer status. * @param {chrome.fileManagerPrivate.FileTransferStatus} status Transfer status.
* @private * @private
*/ */
DriveSyncHandler.prototype.onFileTransfersUpdated_ = function(status) { DriveSyncHandler.prototype.onFileTransfersUpdated_ = function(status) {
...@@ -157,7 +157,7 @@ DriveSyncHandler.prototype.onFileTransfersUpdated_ = function(status) { ...@@ -157,7 +157,7 @@ DriveSyncHandler.prototype.onFileTransfersUpdated_ = function(status) {
/** /**
* Updates the item involved with the given status. * Updates the item involved with the given status.
* @param {FileTransferStatus} status Transfer status. * @param {chrome.fileManagerPrivate.FileTransferStatus} status Transfer status.
* @private * @private
*/ */
DriveSyncHandler.prototype.updateItem_ = function(status) { DriveSyncHandler.prototype.updateItem_ = function(status) {
...@@ -183,7 +183,7 @@ DriveSyncHandler.prototype.updateItem_ = function(status) { ...@@ -183,7 +183,7 @@ DriveSyncHandler.prototype.updateItem_ = function(status) {
/** /**
* Removes the item involved with the given status. * Removes the item involved with the given status.
* @param {FileTransferStatus} status Transfer status. * @param {chrome.fileManagerPrivate.FileTransferStatus} status Transfer status.
* @private * @private
*/ */
DriveSyncHandler.prototype.removeItem_ = function(status) { DriveSyncHandler.prototype.removeItem_ = function(status) {
...@@ -207,7 +207,8 @@ DriveSyncHandler.prototype.requestCancel_ = function() { ...@@ -207,7 +207,8 @@ DriveSyncHandler.prototype.requestCancel_ = function() {
/** /**
* Handles drive's sync errors. * Handles drive's sync errors.
* @param {DriveSyncErrorEvent} event Drive sync error event. * @param {chrome.fileManagerPrivate.DriveSyncErrorEvent} event Drive sync
* error event.
* @private * @private
*/ */
DriveSyncHandler.prototype.onDriveSyncError_ = function(event) { DriveSyncHandler.prototype.onDriveSyncError_ = function(event) {
......
...@@ -838,7 +838,7 @@ importer.DriveSyncWatcher.prototype.updateSyncStatus_ = ...@@ -838,7 +838,7 @@ importer.DriveSyncWatcher.prototype.updateSyncStatus_ =
}; };
/** /**
* @param {!FileTransferStatus} status * @param {!chrome.fileManagerPrivate.FileTransferStatus} status
* @private * @private
*/ */
importer.DriveSyncWatcher.prototype.onFileTransfersUpdated_ = importer.DriveSyncWatcher.prototype.onFileTransfersUpdated_ =
...@@ -916,24 +916,24 @@ importer.DriveSyncWatcher.prototype.getSyncStatus_ = function(url) { ...@@ -916,24 +916,24 @@ importer.DriveSyncWatcher.prototype.getSyncStatus_ = function(url) {
// TODO(smckay): User Metadata Cache...once it is available // TODO(smckay): User Metadata Cache...once it is available
// in the background. // in the background.
chrome.fileManagerPrivate.getEntryProperties( chrome.fileManagerPrivate.getEntryProperties(
[results.entries[0]], [results.entries[0]], ['dirty'],
['dirty'],
(/** (/**
* @param {!Array<!EntryProperties>|undefined} * @param
* propertiesList * {!Array<!chrome.fileManagerPrivate.EntryProperties>|undefined}
* @this {importer.DriveSyncWatcher} * propertiesList
*/ * @this {importer.DriveSyncWatcher}
function(propertiesList) { */
console.assert( function(propertiesList) {
propertiesList.length === 1, console.assert(
'Got an unexpected number of results.'); propertiesList.length === 1,
if (chrome.runtime.lastError) { 'Got an unexpected number of results.');
reject(chrome.runtime.lastError); if (chrome.runtime.lastError) {
} else { reject(chrome.runtime.lastError);
var data = propertiesList[0]; } else {
resolve(!data['dirty']); var data = propertiesList[0];
} resolve(!data['dirty']);
}).bind(this)); }
}).bind(this));
}).bind(this)); }).bind(this));
}) })
.catch(importer.getLogger().catcher('drive-sync-watcher-get-sync-status')); .catch(importer.getLogger().catcher('drive-sync-watcher-get-sync-status'));
......
...@@ -613,7 +613,7 @@ importer.DefaultDirectoryWatcher.prototype.addDirectory = function(entry) { ...@@ -613,7 +613,7 @@ importer.DefaultDirectoryWatcher.prototype.addDirectory = function(entry) {
}; };
/** /**
* @param {FileWatchEvent} event * @param {chrome.fileManagerPrivate.FileWatchEvent} event
* @private * @private
*/ */
importer.DefaultDirectoryWatcher.prototype.onWatchedDirectoryModified_ = importer.DefaultDirectoryWatcher.prototype.onWatchedDirectoryModified_ =
......
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
* @param {VolumeManagerCommon.Source} source Source of the volume's data. * @param {VolumeManagerCommon.Source} source Source of the volume's data.
* @param {VolumeManagerCommon.FileSystemType} diskFileSystemType File system * @param {VolumeManagerCommon.FileSystemType} diskFileSystemType File system
* type indentifier. * type indentifier.
* @param {!IconSet} iconSet Set of icons for this volume. * @param {!chrome.fileManagerPrivate.IconSet} iconSet Set of icons for this
* volume.
*/ */
function VolumeInfoImpl( function VolumeInfoImpl(
volumeType, volumeId, fileSystem, error, deviceType, devicePath, isReadOnly, volumeType, volumeId, fileSystem, error, deviceType, devicePath, isReadOnly,
...@@ -211,7 +212,7 @@ VolumeInfoImpl.prototype = /** @struct */ { ...@@ -211,7 +212,7 @@ VolumeInfoImpl.prototype = /** @struct */ {
return this.diskFileSystemType_; return this.diskFileSystemType_;
}, },
/** /**
* @return {IconSet} Set of icons for this volume. * @return {chrome.fileManagerPrivate.IconSet} Set of icons for this volume.
*/ */
get iconSet() { get iconSet() {
return this.iconSet_; return this.iconSet_;
......
...@@ -70,7 +70,7 @@ VolumeManagerImpl.prototype.__proto__ = cr.EventTarget.prototype; ...@@ -70,7 +70,7 @@ VolumeManagerImpl.prototype.__proto__ = cr.EventTarget.prototype;
/** /**
* Adds new volume info from the given volumeMetadata. If the corresponding * Adds new volume info from the given volumeMetadata. If the corresponding
* volume info has already been added, the volumeMetadata is ignored. * volume info has already been added, the volumeMetadata is ignored.
* @param {!VolumeMetadata} volumeMetadata * @param {!chrome.fileManagerPrivate.VolumeMetadata} volumeMetadata
* @return {!Promise<!VolumeInfo>} * @return {!Promise<!VolumeInfo>}
* @private * @private
*/ */
...@@ -103,7 +103,7 @@ VolumeManagerImpl.prototype.addVolumeMetadata_ = function(volumeMetadata) { ...@@ -103,7 +103,7 @@ VolumeManagerImpl.prototype.addVolumeMetadata_ = function(volumeMetadata) {
// Update the network connection status, because until the drive is // Update the network connection status, because until the drive is
// initialized, the status is set to not ready. // initialized, the status is set to not ready.
// TODO(mtomasz): The connection status should be migrated into // TODO(mtomasz): The connection status should be migrated into
// VolumeMetadata. // chrome.fileManagerPrivate.VolumeMetadata.
if (volumeMetadata.volumeType === if (volumeMetadata.volumeType ===
VolumeManagerCommon.VolumeType.DRIVE) { VolumeManagerCommon.VolumeType.DRIVE) {
this.onDriveConnectionStatusChanged_(); this.onDriveConnectionStatusChanged_();
...@@ -160,7 +160,7 @@ VolumeManagerImpl.prototype.initialize_ = function(callback) { ...@@ -160,7 +160,7 @@ VolumeManagerImpl.prototype.initialize_ = function(callback) {
/** /**
* Event handler called when some volume was mounted or unmounted. * Event handler called when some volume was mounted or unmounted.
* @param {MountCompletedEvent} event Received event. * @param {chrome.fileManagerPrivate.MountCompletedEvent} event Received event.
* @private * @private
*/ */
VolumeManagerImpl.prototype.onMountCompleted_ = function(event) { VolumeManagerImpl.prototype.onMountCompleted_ = function(event) {
......
...@@ -50,8 +50,9 @@ volumeManagerUtil.validateError = function(error) { ...@@ -50,8 +50,9 @@ volumeManagerUtil.validateError = function(error) {
}; };
/** /**
* Builds the VolumeInfo data from VolumeMetadata. * Builds the VolumeInfo data from chrome.fileManagerPrivate.VolumeMetadata.
* @param {VolumeMetadata} volumeMetadata Metadata instance for the volume. * @param {chrome.fileManagerPrivate.VolumeMetadata} volumeMetadata Metadata
* instance for the volume.
* @return {!Promise<!VolumeInfo>} Promise settled with the VolumeInfo instance. * @return {!Promise<!VolumeInfo>} Promise settled with the VolumeInfo instance.
*/ */
volumeManagerUtil.createVolumeInfo = function(volumeMetadata) { volumeManagerUtil.createVolumeInfo = function(volumeMetadata) {
...@@ -201,7 +202,7 @@ volumeManagerUtil.createVolumeInfo = function(volumeMetadata) { ...@@ -201,7 +202,7 @@ volumeManagerUtil.createVolumeInfo = function(volumeMetadata) {
* Note that errorType and volumeType must be an element of fixed set of strings * Note that errorType and volumeType must be an element of fixed set of strings
* to avoid sending dynamic strings to analytics. * to avoid sending dynamic strings to analytics.
* *
* @param {VolumeMetadata} volumeMetadata * @param {chrome.fileManagerPrivate.VolumeMetadata} volumeMetadata
* @param {*} error * @param {*} error
*/ */
volumeManagerUtil.reportMountError = function(volumeMetadata, error) { volumeManagerUtil.reportMountError = function(volumeMetadata, error) {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
var util = {}; var util = {};
/** /**
* @param {!IconSet} iconSet Set of icons. * @param {!chrome.fileManagerPrivate.IconSet} iconSet Set of icons.
* @return {string} CSS value. * @return {string} CSS value.
*/ */
util.iconSetToCSSBackgroundImageValue = function(iconSet) { util.iconSetToCSSBackgroundImageValue = function(iconSet) {
......
...@@ -34,7 +34,7 @@ FileWatcher.prototype.dispose = function() { ...@@ -34,7 +34,7 @@ FileWatcher.prototype.dispose = function() {
/** /**
* Called when a file in the watched directory is changed. * Called when a file in the watched directory is changed.
* @param {FileWatchEvent} event Change event. * @param {chrome.fileManagerPrivate.FileWatchEvent} event Change event.
* @private * @private
*/ */
FileWatcher.prototype.onDirectoryChanged_ = function(event) { FileWatcher.prototype.onDirectoryChanged_ = function(event) {
......
...@@ -1243,7 +1243,7 @@ importer.RuntimeControllerEnvironment.prototype.addVolumeUnmountListener = ...@@ -1243,7 +1243,7 @@ importer.RuntimeControllerEnvironment.prototype.addVolumeUnmountListener =
// TODO(smckay): remove listeners when the page is torn down. // TODO(smckay): remove listeners when the page is torn down.
chrome.fileManagerPrivate.onMountCompleted.addListener( chrome.fileManagerPrivate.onMountCompleted.addListener(
/** /**
* @param {!MountCompletedEvent} event * @param {!chrome.fileManagerPrivate.MountCompletedEvent} event
* @this {importer.RuntimeControllerEnvironment} * @this {importer.RuntimeControllerEnvironment}
*/ */
function(event) { function(event) {
......
...@@ -58,7 +58,7 @@ ExternalMetadataProvider.prototype.get = function(requests) { ...@@ -58,7 +58,7 @@ ExternalMetadataProvider.prototype.get = function(requests) {
/** /**
* @param {!Array<!MetadataRequest>} requests * @param {!Array<!MetadataRequest>} requests
* @param {!Object<boolean>} nameMap * @param {!Object<boolean>} nameMap
* @param {!Array<!EntryProperties>} propertiesList * @param {!Array<!chrome.fileManagerPrivate.EntryProperties>} propertiesList
* @return {!Array<!MetadataItem>} * @return {!Array<!MetadataItem>}
*/ */
ExternalMetadataProvider.prototype.convertResults_ = ExternalMetadataProvider.prototype.convertResults_ =
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* An item in the model. Represents a single providing extension. * An item in the model. Represents a single providing extension.
* *
* @param {string} providerId * @param {string} providerId
* @param {!IconSet} iconSet * @param {!chrome.fileManagerPrivate.IconSet} iconSet
* @param {string} name * @param {string} name
* @param {boolean} configurable * @param {boolean} configurable
* @param {boolean} watchable * @param {boolean} watchable
...@@ -26,7 +26,7 @@ function ProvidersModelItem( ...@@ -26,7 +26,7 @@ function ProvidersModelItem(
this.providerId_ = providerId; this.providerId_ = providerId;
/** /**
* @private {!IconSet} * @private {!chrome.fileManagerPrivate.IconSet}
* @const * @const
*/ */
this.iconSet_ = iconSet; this.iconSet_ = iconSet;
...@@ -71,7 +71,7 @@ ProvidersModelItem.prototype = { ...@@ -71,7 +71,7 @@ ProvidersModelItem.prototype = {
}, },
/** /**
* @return {!IconSet} * @return {!chrome.fileManagerPrivate.IconSet}
*/ */
get iconSet() { get iconSet() {
return this.iconSet_; return this.iconSet_;
......
...@@ -276,7 +276,7 @@ QuickViewController.prototype.onFileSelectionChanged_ = function(event) { ...@@ -276,7 +276,7 @@ QuickViewController.prototype.onFileSelectionChanged_ = function(event) {
/** /**
* @param {!FileEntry} entry * @param {!FileEntry} entry
* @return {!Promise<!Array<!FileTask>>} * @return {!Promise<!Array<!chrome.fileManagerPrivate.FileTask>>}
* @private * @private
*/ */
QuickViewController.prototype.getAvailableTasks_ = function(entry) { QuickViewController.prototype.getAvailableTasks_ = function(entry) {
...@@ -313,7 +313,8 @@ QuickViewController.prototype.updateQuickView_ = function() { ...@@ -313,7 +313,8 @@ QuickViewController.prototype.updateQuickView_ = function() {
]) ])
.then(function(values) { .then(function(values) {
var items = (/**@type{Array<MetadataItem>}*/ (values[0])); var items = (/**@type{Array<MetadataItem>}*/ (values[0]));
var tasks = (/**@type{!Array<!FileTask>}*/ (values[1])); var tasks = (/**@type{!Array<!chrome.fileManagerPrivate.FileTask>}*/ (
values[1]));
return this.onMetadataLoaded_(entry, items, tasks); return this.onMetadataLoaded_(entry, items, tasks);
}.bind(this)) }.bind(this))
.catch(console.error); .catch(console.error);
...@@ -324,7 +325,7 @@ QuickViewController.prototype.updateQuickView_ = function() { ...@@ -324,7 +325,7 @@ QuickViewController.prototype.updateQuickView_ = function() {
* *
* @param {!FileEntry} entry * @param {!FileEntry} entry
* @param {Array<MetadataItem>} items * @param {Array<MetadataItem>} items
* @param {!Array<!FileTask>} tasks * @param {!Array<!chrome.fileManagerPrivate.FileTask>} tasks
* @private * @private
*/ */
QuickViewController.prototype.onMetadataLoaded_ = function( QuickViewController.prototype.onMetadataLoaded_ = function(
...@@ -360,7 +361,7 @@ var QuickViewParams; ...@@ -360,7 +361,7 @@ var QuickViewParams;
/** /**
* @param {!FileEntry} entry * @param {!FileEntry} entry
* @param {Array<MetadataItem>} items * @param {Array<MetadataItem>} items
* @param {!Array<!FileTask>} tasks * @param {!Array<!chrome.fileManagerPrivate.FileTask>} tasks
* @return !Promise<!QuickViewParams> * @return !Promise<!QuickViewParams>
* *
* @private * @private
......
...@@ -1586,7 +1586,7 @@ DirectoryTree.prototype.onFilterChanged_ = function() { ...@@ -1586,7 +1586,7 @@ DirectoryTree.prototype.onFilterChanged_ = function() {
/** /**
* Invoked when a directory is changed. * Invoked when a directory is changed.
* @param {!FileWatchEvent} event Event. * @param {!chrome.fileManagerPrivate.FileWatchEvent} event Event.
* @private * @private
*/ */
DirectoryTree.prototype.onDirectoryContentChanged_ = function(event) { DirectoryTree.prototype.onDirectoryContentChanged_ = function(event) {
......
...@@ -63,7 +63,7 @@ function GearMenu(element) { ...@@ -63,7 +63,7 @@ function GearMenu(element) {
/** /**
* Volume space info. * Volume space info.
* @type {Promise<MountPointSizeStats>} * @type {Promise<chrome.fileManagerPrivate.MountPointSizeStats>}
* @private * @private
*/ */
this.spaceInfoPromise_ = null; this.spaceInfoPromise_ = null;
...@@ -74,8 +74,8 @@ function GearMenu(element) { ...@@ -74,8 +74,8 @@ function GearMenu(element) {
} }
/** /**
* @param {Promise<MountPointSizeStats>} spaceInfoPromise Promise to be * @param {Promise<chrome.fileManagerPrivate.MountPointSizeStats>}
* fulfilled with space info. * spaceInfoPromise Promise to be fulfilled with space info.
* @param {boolean} showLoadingCaption Whether show loading caption or not. * @param {boolean} showLoadingCaption Whether show loading caption or not.
*/ */
GearMenu.prototype.setSpaceInfo = function( GearMenu.prototype.setSpaceInfo = function(
......
...@@ -61,7 +61,8 @@ ProvidersMenu.prototype.addMenuItem_ = function() { ...@@ -61,7 +61,8 @@ ProvidersMenu.prototype.addMenuItem_ = function() {
/** /**
* @param {string} providerId ID of the provider. * @param {string} providerId ID of the provider.
* @param {!IconSet} iconSet Set of icons for the provider. * @param {!chrome.fileManagerPrivate.IconSet} iconSet Set of icons for the
* provider.
* @param {string} name Already localized name of the provider. * @param {string} name Already localized name of the provider.
* @private * @private
*/ */
......
...@@ -144,7 +144,8 @@ SearchBox.AutocompleteList.prototype.onMouseOver_ = function(event) { ...@@ -144,7 +144,8 @@ SearchBox.AutocompleteList.prototype.onMouseOver_ = function(event) {
* ListItem element for autocomplete. * ListItem element for autocomplete.
* *
* @param {Document} document Document. * @param {Document} document Document.
* @param {SearchItem|SearchResult} item An object representing a suggestion. * @param {SearchItem|chrome.fileManagerPrivate.SearchResult} item An object
* representing a suggestion.
* @constructor * @constructor
* @private * @private
*/ */
......
...@@ -54,7 +54,7 @@ chrome.fileManagerPrivate = { ...@@ -54,7 +54,7 @@ chrome.fileManagerPrivate = {
setTimeout(callback, 0, mockVolumeManager.getDriveConnectionState()); setTimeout(callback, 0, mockVolumeManager.getDriveConnectionState());
}, },
getEntryProperties: (entries, names, callback) => { getEntryProperties: (entries, names, callback) => {
// Returns EntryProperties[]. // Returns chrome.fileManagerPrivate.EntryProperties[].
var results = []; var results = [];
entries.forEach(entry => { entries.forEach(entry => {
var props = {}; var props = {};
...@@ -66,7 +66,7 @@ chrome.fileManagerPrivate = { ...@@ -66,7 +66,7 @@ chrome.fileManagerPrivate = {
setTimeout(callback, 0, results); setTimeout(callback, 0, results);
}, },
getFileTasks: (entries, callback) => { getFileTasks: (entries, callback) => {
// Returns FileTask[]. // Returns chrome.fileManagerPrivate.FileTask[].
var results = []; var results = [];
// Support for view-in-browser on single text file used by QuickView. // Support for view-in-browser on single text file used by QuickView.
if (entries.length == 1 && if (entries.length == 1 &&
...@@ -90,7 +90,7 @@ chrome.fileManagerPrivate = { ...@@ -90,7 +90,7 @@ chrome.fileManagerPrivate = {
chrome.fileManagerPrivate.displayedId_); chrome.fileManagerPrivate.displayedId_);
}, },
getProviders: (callback) => { getProviders: (callback) => {
// Returns Provider[]. // Returns chrome.fileManagerPrivate.Provider[].
setTimeout(callback, 0, []); setTimeout(callback, 0, []);
}, },
getRecentFiles: (restriction, callback) => { getRecentFiles: (restriction, callback) => {
...@@ -98,7 +98,8 @@ chrome.fileManagerPrivate = { ...@@ -98,7 +98,8 @@ chrome.fileManagerPrivate = {
setTimeout(callback, 0, []); setTimeout(callback, 0, []);
}, },
getSizeStats: (volumeId, callback) => { getSizeStats: (volumeId, callback) => {
// MountPointSizeStats { totalSize: double, remainingSize: double } // chrome.fileManagerPrivate.MountPointSizeStats { totalSize: double,
// remainingSize: double }
setTimeout(callback, 0, {totalSize: 16e9, remainingSize: 8e9}); setTimeout(callback, 0, {totalSize: 16e9, remainingSize: 8e9});
}, },
getStrings: (callback) => { getStrings: (callback) => {
...@@ -189,8 +190,9 @@ chrome.fileManagerPrivate = { ...@@ -189,8 +190,9 @@ chrome.fileManagerPrivate = {
setTimeout(callback, 0, entries); setTimeout(callback, 0, entries);
}, },
searchDriveMetadata: (searchParams, callback) => { searchDriveMetadata: (searchParams, callback) => {
// Returns SearchResult[]. // Returns chrome.fileManagerPrivate.SearchResult[].
// SearchResult { entry: Entry, highlightedBaseName: string } // chrome.fileManagerPrivate.SearchResult { entry: Entry,
// highlightedBaseName: string }
setTimeout(callback, 0, []); setTimeout(callback, 0, []);
}, },
nextCopyId_: 0, nextCopyId_: 0,
......
...@@ -102,7 +102,7 @@ EntryListWatcher.prototype.onSplice_ = function(event) { ...@@ -102,7 +102,7 @@ EntryListWatcher.prototype.onSplice_ = function(event) {
}; };
/** /**
* @param {!FileWatchEvent} event * @param {!chrome.fileManagerPrivate.FileWatchEvent} event
* @private * @private
*/ */
EntryListWatcher.prototype.onDirectoryChanged_ = function(event) { EntryListWatcher.prototype.onDirectoryChanged_ = function(event) {
......
...@@ -1749,7 +1749,7 @@ SlideMode.prototype.hideProgressBar_ = function() { ...@@ -1749,7 +1749,7 @@ SlideMode.prototype.hideProgressBar_ = function() {
/** /**
* Updates progress bar. * Updates progress bar.
* @param {!FileTransferStatus} status * @param {!chrome.fileManagerPrivate.FileTransferStatus} status
* @private * @private
*/ */
SlideMode.prototype.updateProgressBar_ = function(status) { SlideMode.prototype.updateProgressBar_ = function(status) {
......
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