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

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

Issue 736663002: Refoctoring FileSelection and FileSelectionHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
Index: ui/file_manager/file_manager/foreground/js/file_manager.js
diff --git a/ui/file_manager/file_manager/foreground/js/file_manager.js b/ui/file_manager/file_manager/foreground/js/file_manager.js
index 08ae7cee9b0a648e68b418c89926014f23b39d15..6f5d831820e96db7dc9789acf62e1692a151b357 100644
--- a/ui/file_manager/file_manager/foreground/js/file_manager.js
+++ b/ui/file_manager/file_manager/foreground/js/file_manager.js
@@ -385,6 +385,12 @@ FileManager.prototype = /** @struct */ {
return this.historyLoader_;
},
/**
+ * @return {MetadataCache}
+ */
+ get metadataCache() {
+ return this.metadataCache_;
+ },
+ /**
* @return {FileManagerUI}
*/
get ui() {
@@ -1805,7 +1811,7 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
var entry = selection.entries[0];
if (entry.isDirectory) {
- this.onDirectoryAction_(entry);
+ this.onDirectoryAction_(/** @type {!DirectoryEntry} */(entry));
} else {
this.dispatchSelectionAction_();
}
@@ -2190,7 +2196,8 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
// directory.
if (!item.hasAttribute('renaming')) {
event.preventDefault();
- this.onDirectoryAction_(selection.entries[0]);
+ this.onDirectoryAction_(
+ /** @type {DirectoryEntry} */(selection.entries[0]));
}
} else if (this.dispatchSelectionAction_()) {
event.preventDefault();

Powered by Google App Engine
This is Rietveld 408576698