Commit dd2af2ca authored by Nigel Tao's avatar Nigel Tao Committed by Commit Bot

Re-order file_manager_private.js declarations

This neither adds nor deletes declarations. It reorders them to lessen
the diff on a subsequent commit (which automatically generates
file_manager_private.js by running
tools/json_schema_compiler/compiler.py on file_manager_private.idl).

Two declarations (EntryAction, installWebstoreItem) don't have any
corresponding entry in the file_manager_private.idl file.

Test: "ninja ui/file_manager:closure_compile" runs without error
Bug: 613096
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I6dcc4a8f4f51182f7e33509decebe72b221f3ea6
Reviewed-on: https://chromium-review.googlesource.com/1082185Reviewed-by: default avatarSasha Morrissey <sashab@chromium.org>
Commit-Queue: Nigel Tao <nigeltao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564789}
parent 9683458c
...@@ -4,6 +4,26 @@ ...@@ -4,6 +4,26 @@
/** @fileoverview Externs generated from namespace: fileManagerPrivate */ /** @fileoverview Externs generated from namespace: fileManagerPrivate */
/**
* @const
*/
chrome.fileManagerPrivate = {};
/** @enum {string} */
chrome.fileManagerPrivate.Verb = {
OPEN_WITH: 'open_with',
ADD_TO: 'add_to',
PACK_WITH: 'pack_with',
SHARE_WITH: 'share_with',
};
/** @enum {string} */
chrome.fileManagerPrivate.SourceRestriction = {
ANY_SOURCE: 'any_source',
NATIVE_SOURCE: 'native_source',
NATIVE_OR_DRIVE_SOURCE: 'native_or_drive_source',
};
/** /**
* @typedef {{ * @typedef {{
* taskId: string, * taskId: string,
...@@ -14,14 +34,6 @@ ...@@ -14,14 +34,6 @@
*/ */
var FileTask; var FileTask;
/**
* @typedef {{
* icon16x16Url: (string|undefined),
* icon32x32Url: (string|undefined)
* }}
*/
var IconSet;
/** /**
* @typedef {{ * @typedef {{
* size: (number|undefined), * size: (number|undefined),
...@@ -29,22 +41,22 @@ var IconSet; ...@@ -29,22 +41,22 @@ var IconSet;
* modificationByMeTime: (number|undefined), * modificationByMeTime: (number|undefined),
* thumbnailUrl: (string|undefined), * thumbnailUrl: (string|undefined),
* croppedThumbnailUrl: (string|undefined), * croppedThumbnailUrl: (string|undefined),
* externalFileUrl: (string|undefined),
* alternateUrl: (string|undefined),
* shareUrl: (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),
* externalFileUrl: (string|undefined),
* alternateUrl: (string|undefined),
* shareUrl: (string|undefined)
* }} * }}
*/ */
var EntryProperties; var EntryProperties;
...@@ -66,11 +78,18 @@ var MountPointSizeStats; ...@@ -66,11 +78,18 @@ var MountPointSizeStats;
*/ */
var ProfileInfo; var ProfileInfo;
/**
* @typedef {{
* icon16x16Url: (string|undefined),
* icon32x32Url: (string|undefined)
* }}
*/
var IconSet;
/** /**
* @typedef {{ * @typedef {{
* volumeId: string, * volumeId: string,
* fileSystemId: (string|undefined), * fileSystemId: (string|undefined),
* iconSet: IconSet,
* source: string, * source: string,
* volumeLabel: (string|undefined), * volumeLabel: (string|undefined),
* profile: ProfileInfo, * profile: ProfileInfo,
...@@ -86,7 +105,8 @@ var ProfileInfo; ...@@ -86,7 +105,8 @@ var ProfileInfo;
* watchable: boolean, * watchable: boolean,
* mountCondition: (string|undefined), * mountCondition: (string|undefined),
* mountContext: (string|undefined), * mountContext: (string|undefined),
* diskFileSystemType: (string|undefined) * diskFileSystemType: (string|undefined),
* iconSet: IconSet
* }} * }}
*/ */
var VolumeMetadata; var VolumeMetadata;
...@@ -224,19 +244,6 @@ var DeviceEvent; ...@@ -224,19 +244,6 @@ var DeviceEvent;
*/ */
var Provider; var Provider;
/**
* @typedef {{
* id: string,
* title: (string|undefined)
* }}
*/
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.
...@@ -281,6 +288,14 @@ chrome.fileManagerPrivate.setDefaultTask = function(taskId, entries, mimeTypes, ...@@ -281,6 +288,14 @@ chrome.fileManagerPrivate.setDefaultTask = function(taskId, entries, mimeTypes,
*/ */
chrome.fileManagerPrivate.getFileTasks = function(entries, callback) {}; chrome.fileManagerPrivate.getFileTasks = function(entries, callback) {};
/**
* Gets the MIME type of a file.
* @param {!Entry} entry
* @param {function((string|undefined))} callback Callback that MIME type of the
* file is passed.
*/
chrome.fileManagerPrivate.getMimeType = function(entry, callback) {};
/** /**
* Gets localized strings and initialization data. |callback| * Gets localized strings and initialization data. |callback|
* @param {function((!Object|undefined))} callback |result| Hash containing the * @param {function((!Object|undefined))} callback |result| Hash containing the
...@@ -602,17 +617,6 @@ chrome.fileManagerPrivate.getDownloadUrl = function(entry, callback) {}; ...@@ -602,17 +617,6 @@ chrome.fileManagerPrivate.getDownloadUrl = function(entry, callback) {};
chrome.fileManagerPrivate.requestDriveShare = function(entry, shareType, chrome.fileManagerPrivate.requestDriveShare = function(entry, shareType,
callback) {}; 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<!ProfileInfo>|undefined), (string|undefined), * @param {function((!Array<!ProfileInfo>|undefined), (string|undefined),
...@@ -642,14 +646,6 @@ chrome.fileManagerPrivate.openSettingsSubpage = function(sub_page) {}; ...@@ -642,14 +646,6 @@ chrome.fileManagerPrivate.openSettingsSubpage = function(sub_page) {};
*/ */
chrome.fileManagerPrivate.computeChecksum = function(entry, callback) {}; chrome.fileManagerPrivate.computeChecksum = function(entry, callback) {};
/**
* Gets the MIME type of a file.
* @param {!Entry} entry
* @param {function((string|undefined))} callback Callback that MIME type of the
* file is passed.
*/
chrome.fileManagerPrivate.getMimeType = function(entry, callback) {};
/** /**
* Gets a flag indicating whether user metrics reporting is enabled. * Gets a flag indicating whether user metrics reporting is enabled.
* @param {function((boolean|undefined))} callback * @param {function((boolean|undefined))} callback
...@@ -704,6 +700,16 @@ chrome.fileManagerPrivate.configureVolume = function(volumeId, callback) {}; ...@@ -704,6 +700,16 @@ chrome.fileManagerPrivate.configureVolume = function(volumeId, callback) {};
*/ */
chrome.fileManagerPrivate.getCustomActions = function(entries, callback) {}; chrome.fileManagerPrivate.getCustomActions = function(entries, callback) {};
/**
* Executes the action on the specified set of entries. If not possible, then
* returns an error via chrome.runtime.lastError.
* @param {!Array<!Entry>} entries
* @param {string} actionId
* @param {function()} callback
*/
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|
...@@ -719,16 +725,6 @@ chrome.fileManagerPrivate.getDirectorySize = function(entry, callback) {}; ...@@ -719,16 +725,6 @@ chrome.fileManagerPrivate.getDirectorySize = function(entry, callback) {};
*/ */
chrome.fileManagerPrivate.getRecentFiles = function(restriction, callback) {}; chrome.fileManagerPrivate.getRecentFiles = function(restriction, callback) {};
/**
* Executes the action on the specified set of entries. If not possible, then
* returns an error via chrome.runtime.lastError.
* @param {!Array<!Entry>} entries
* @param {string} actionId
* @param {function()} callback
*/
chrome.fileManagerPrivate.executeCustomAction = function(
entries, actionId, callback) {};
/** /**
* Returns true if crostini is enabled. * Returns true if crostini is enabled.
* @param {function(boolean)} callback * @param {function(boolean)} callback
...@@ -770,17 +766,27 @@ chrome.fileManagerPrivate.onDriveSyncError; ...@@ -770,17 +766,27 @@ chrome.fileManagerPrivate.onDriveSyncError;
/** @type {!ChromeEvent} */ /** @type {!ChromeEvent} */
chrome.fileManagerPrivate.onAppsUpdated; chrome.fileManagerPrivate.onAppsUpdated;
/** @enum {string} */ /* The two declarations below (EntryAction, installWebstoreItem) don't have any
chrome.fileManagerPrivate.Verb = { * corresponding entry in the file_manager_private.idl file.
OPEN_WITH: 'open_with', *
ADD_TO: 'add_to', * TODO(nigeltao): delete them.
PACK_WITH: 'pack_with', */
SHARE_WITH: 'share_with',
};
/** @enum {string} */ /**
chrome.fileManagerPrivate.SourceRestriction = { * @typedef {{
ANY_SOURCE: 'any_source', * id: string,
NATIVE_SOURCE: 'native_source', * title: (string|undefined)
NATIVE_OR_DRIVE_SOURCE: 'native_or_drive_source', * }}
}; */
var EntryAction;
/**
* 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) {};
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