Index: chrome/browser/resources/file_manager/js/file_selection.js |
diff --git a/chrome/browser/resources/file_manager/js/file_selection.js b/chrome/browser/resources/file_manager/js/file_selection.js |
index c464c923110a9812630ca2cdece42f3fa4c7bee5..deffef80ea54bc1126b8eb3f5bd70a01b4c92f3d 100644 |
--- a/chrome/browser/resources/file_manager/js/file_selection.js |
+++ b/chrome/browser/resources/file_manager/js/file_selection.js |
@@ -4,8 +4,10 @@ |
/** |
* The current selection object. |
+ * |
* @param {FileManager} fileManager FileManager instance. |
* @param {Array.<number>} indexes Selected indexes. |
+ * @constructor |
*/ |
function FileSelection(fileManager, indexes) { |
this.fileManager_ = fileManager; |
@@ -52,6 +54,7 @@ function FileSelection(fileManager, indexes) { |
/** |
* Computes data required to get file tasks and requests the tasks. |
+ * |
* @param {function} callback The callback. |
*/ |
FileSelection.prototype.createTasks = function(callback) { |
@@ -77,6 +80,7 @@ FileSelection.prototype.createTasks = function(callback) { |
/** |
* Computes the total size of selected files. |
+ * |
* @param {function} callback The callback. |
*/ |
FileSelection.prototype.computeBytes = function(callback) { |
@@ -123,6 +127,7 @@ FileSelection.prototype.computeBytes = function(callback) { |
/** |
* Cancels any async computation. |
+ * |
* @private |
*/ |
FileSelection.prototype.cancelComputing_ = function() { |
@@ -131,7 +136,9 @@ FileSelection.prototype.cancelComputing_ = function() { |
/** |
* This object encapsulates everything related to current selection. |
+ * |
* @param {FileManager} fileManager File manager instance. |
+ * @constructor |
*/ |
function FileSelectionHandler(fileManager) { |
this.fileManager_ = fileManager; |
@@ -156,12 +163,18 @@ function FileSelectionHandler(fileManager) { |
/** |
* Maximum amount of thumbnails in the preview pane. |
+ * |
+ * @const |
+ * @type {number} |
*/ |
FileSelectionHandler.MAX_PREVIEW_THUMBNAIL_COUNT = 4; |
/** |
* Maximum width or height of an image what pops up when the mouse hovers |
* thumbnail in the bottom panel (in pixels). |
+ * |
+ * @const |
+ * @type {number} |
*/ |
FileSelectionHandler.IMAGE_HOVER_PREVIEW_SIZE = 200; |
@@ -235,6 +248,7 @@ FileSelectionHandler.prototype.clearUI = function() { |
/** |
* Updates the Ok button enabled state. |
+ * |
* @return {boolean} Whether button is enabled. |
*/ |
FileSelectionHandler.prototype.updateOkButton = function() { |
@@ -275,6 +289,7 @@ FileSelectionHandler.prototype.updateOkButton = function() { |
* Check if all the files in the current selection are available. The only |
* case when files might be not available is when the selection contains |
* uncached Drive files and the browser is offline. |
+ * |
* @return {boolean} True if all files in the current selection are |
* available. |
*/ |
@@ -286,6 +301,7 @@ FileSelectionHandler.prototype.isFileSelectionAvailable = function() { |
/** |
* Animates preview panel show/hide transitions. |
+ * |
* @private |
*/ |
FileSelectionHandler.prototype.updatePreviewPanelVisibility_ = function() { |
@@ -347,6 +363,7 @@ FileSelectionHandler.prototype.isPreviewPanelVisibile_ = function() { |
/** |
* Update the selection summary in preview panel. |
+ * |
* @private |
*/ |
FileSelectionHandler.prototype.updatePreviewPanelText_ = function() { |
@@ -382,6 +399,7 @@ FileSelectionHandler.prototype.updatePreviewPanelText_ = function() { |
/** |
* Displays the 'calculating size' label. |
+ * |
* @private |
*/ |
FileSelectionHandler.prototype.showCalculating_ = function() { |
@@ -415,6 +433,7 @@ FileSelectionHandler.prototype.showCalculating_ = function() { |
/** |
* Hides the 'calculating size' label. |
+ * |
* @private |
*/ |
FileSelectionHandler.prototype.hideCalculating_ = function() { |
@@ -427,6 +446,7 @@ FileSelectionHandler.prototype.hideCalculating_ = function() { |
/** |
* Calculates async selection stats and updates secondary UI elements. |
+ * |
* @param {FileSelection} selection The selection object. |
*/ |
FileSelectionHandler.prototype.updateFileSelectionAsync = function(selection) { |
@@ -478,6 +498,7 @@ FileSelectionHandler.prototype.updateFileSelectionAsync = function(selection) { |
/** |
* Renders preview thumbnails in preview panel. |
+ * |
* @param {FileSelection} selection The selection object. |
* @private |
*/ |
@@ -564,6 +585,7 @@ FileSelectionHandler.prototype.showPreviewThumbnails_ = function(selection) { |
/** |
* Renders a thumbnail for the buttom panel. |
+ * |
* @param {Entry} entry Entry to render for. |
* @param {Function} callback Callend when image loaded. |
* @return {HTMLDivElement} Created element. |
@@ -581,6 +603,7 @@ FileSelectionHandler.prototype.renderThumbnail_ = function(entry, callback) { |
/** |
* Updates the search breadcrumbs. |
+ * |
* @private |
*/ |
FileSelectionHandler.prototype.updateSearchBreadcrumbs_ = function() { |