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

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

Issue 912783002: Integrate ListThumbnailLoader to list view and grid view. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix failed test case. Created 5 years, 10 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
Index: ui/file_manager/file_manager/foreground/js/ui/list_container.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/list_container.js b/ui/file_manager/file_manager/foreground/js/ui/list_container.js
index b6013b5b1e94a3d9bd445a98520ec3075a0420fb..3d444905b33dceb3132a242e772e79d2a2943097 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/list_container.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/list_container.js
@@ -76,6 +76,11 @@ function ListContainer(element, table, grid) {
this.dataModel = null;
/**
+ * @type {ListThumbnailLoader}
+ */
+ this.listThumbnailLoader = null;
+
+ /**
* @type {cr.ui.ListSelectionModel|cr.ui.ListSingleSelectionModel}
*/
this.selectionModel = null;
@@ -88,7 +93,7 @@ function ListContainer(element, table, grid) {
*/
this.emptyDataModel_ = new cr.ui.ArrayDataModel([]);
- /**
+ /**
* Selection model which is used as a placefolder in inactive file list.
* @type {!cr.ui.ListSelectionModel}
* @const
@@ -208,19 +213,23 @@ ListContainer.prototype.setCurrentListType = function(listType) {
switch (listType) {
case ListContainer.ListType.DETAIL:
this.table.dataModel = this.dataModel;
+ this.table.setListThumbnailLoader(this.listThumbnailLoader);
this.table.selectionModel = this.selectionModel;
this.table.hidden = false;
this.grid.hidden = true;
this.grid.selectionModel = this.emptySelectionModel_;
+ this.grid.setListThumbnailLoader(null);
this.grid.dataModel = this.emptyDataModel_;
break;
case ListContainer.ListType.THUMBNAIL:
this.grid.dataModel = this.dataModel;
+ this.grid.setListThumbnailLoader(this.listThumbnailLoader);
this.grid.selectionModel = this.selectionModel;
this.grid.hidden = false;
this.table.hidden = true;
this.table.selectionModel = this.emptySelectionModel_;
+ this.table.setListThumbnailLoader(null);
this.table.dataModel = this.emptyDataModel_;
break;
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/ui/file_table_list.js ('k') | ui/file_manager/file_manager/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698