Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(707)

Unified Diff: ui/file_manager/gallery/js/gallery.js

Issue 571453002: Correct indentation, JSDoc, etc... to comply with closure linter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/file_manager/gallery/js/background.js ('k') | ui/file_manager/gallery/js/gallery_item.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/gallery.js
diff --git a/ui/file_manager/gallery/js/gallery.js b/ui/file_manager/gallery/js/gallery.js
index ca57fdea6339a64d8a788362b574f2766d9e9e1b..3641ccce4719ed97118a00e30cc876f209cd3c57 100644
--- a/ui/file_manager/gallery/js/gallery.js
+++ b/ui/file_manager/gallery/js/gallery.js
@@ -905,7 +905,7 @@ Gallery.prototype.onFilenameFocus_ = function() {
* Blur event handler on filename edit box.
*
* @param {Event} event Blur event.
- * @return {boolean} if default action should be prevented.
+ * @return {Promise} Promise fulfilled on renaming completed.
* @private
*/
Gallery.prototype.onFilenameEditBlur_ = function(event) {
@@ -921,7 +921,7 @@ Gallery.prototype.onFilenameEditBlur_ = function(event) {
this.dataModel_.dispatchEvent(event);
}.bind(this), function(error) {
if (error === 'NOT_CHANGED')
- return;
+ return Promise.resolve();
this.filenameEdit_.value =
ImageUtil.getDisplayNameFromName(item.getEntry().name);
this.filenameEdit_.focus();
@@ -936,6 +936,7 @@ Gallery.prototype.onFilenameEditBlur_ = function(event) {
ImageUtil.setAttribute(this.filenameSpacer_, 'renaming', false);
this.onUserAction_();
+ return Promise.resolve();
};
/**
@@ -1028,6 +1029,8 @@ window.initialize = function(backgroundComponents) {
/**
* Loads entries.
+ * @param {!Array.<Entry>} entries Array of entries.
+ * @param {!Array.<Entry>} selectedEntries Array of selected entries.
*/
window.loadEntries = function(entries, selectedEntries) {
gallery.load(entries, selectedEntries);
« no previous file with comments | « ui/file_manager/gallery/js/background.js ('k') | ui/file_manager/gallery/js/gallery_item.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698