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

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

Issue 2589133002: Quick view lazy load part 1: initialize controllers lazily. (Closed)
Patch Set: . Created 4 years 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 | « no previous file | ui/file_manager/file_manager/foreground/js/metadata_box_controller.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7f371735442be60e2cdb229200f47115f220e37b..86a137637c36f19cc4dd85dd9f30e5a42233a8cc 100644
--- a/ui/file_manager/file_manager/foreground/js/file_manager.js
+++ b/ui/file_manager/file_manager/foreground/js/file_manager.js
@@ -277,12 +277,6 @@ function FileManager() {
*/
this.quickViewController_ = null;
- /**
- * @type {MetadataBoxController}
- * @private
- */
- this.metadataBoxController_ = null;
-
// --------------------------------------------------------------------------
// DOM elements.
@@ -544,21 +538,17 @@ FileManager.prototype = /** @struct */ {
this.selectionHandler_, assert(this.ui_));
this.quickViewModel_ = new QuickViewModel();
- /**@private {!FilesQuickView} */
- var quickView = /** @type {!FilesQuickView} */
- (queryRequiredElement('#quick-view'));
var fileListSelectionModel = /** @type {!cr.ui.ListSelectionModel} */ (
this.directoryModel_.getFileListSelection());
this.quickViewUma_ =
new QuickViewUma(assert(this.volumeManager_), assert(this.dialogType));
+ var metadataBoxController = new MetadataBoxController(
+ this.metadataModel_, this.quickViewModel_, this.fileMetadataFormatter_);
this.quickViewController_ = new QuickViewController(
- quickView, assert(this.metadataModel_), assert(this.selectionHandler_),
+ assert(this.metadataModel_), assert(this.selectionHandler_),
assert(this.ui_.listContainer), assert(this.quickViewModel_),
assert(this.taskController_), fileListSelectionModel,
- assert(this.quickViewUma_));
- this.metadataBoxController_ = new MetadataBoxController(
- this.metadataModel_, quickView.getFilesMetadataBox(), quickView,
- this.quickViewModel_, this.fileMetadataFormatter_);
+ assert(this.quickViewUma_), metadataBoxController);
if (this.dialogType === DialogType.FULL_PAGE) {
importer.importEnabled().then(
« no previous file with comments | « no previous file | ui/file_manager/file_manager/foreground/js/metadata_box_controller.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698