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

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

Issue 2043333002: Quick View: Space key opens quick view for image, video and audio in Download. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve comment Created 4 years, 6 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/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 bc110b5b084d03308f007d9ddb3ed566ee0a2288..0015cbcef85396cc637400ade82cbb0d22d4a91a 100644
--- a/ui/file_manager/file_manager/foreground/js/file_manager.js
+++ b/ui/file_manager/file_manager/foreground/js/file_manager.js
@@ -254,6 +254,12 @@ function FileManager() {
/** @private {ColumnVisibilityController} */
this.columnVisibilityController_ = null;
+ /**
+ * @type {QuickViewController}
+ * @private
+ */
+ this.quickViewController_ = null;
+
// --------------------------------------------------------------------------
// DOM elements.
@@ -510,6 +516,19 @@ FileManager.prototype = /** @struct */ {
this.backgroundPage_.background.driveSyncHandler,
this.selectionHandler_, assert(this.ui_));
+ /**@private {!FilesQuickView} */
+ var quickView =/** @type {!FilesQuickView} */
+ (queryRequiredElement('#quick-view'));
+ chrome.commandLinePrivate.hasSwitch(
+ 'disable-files-quick-view', function(disabled) {
+ if (!disabled) {
+ this.quickViewController_ = new QuickViewController(
+ quickView,
+ assert(this.metadataModel_), assert(this.selectionHandler_),
+ assert(this.ui_.listContainer));
+ }
+ }.bind(this));
+
if (this.dialogType === DialogType.FULL_PAGE) {
importer.importEnabled().then(
function(enabled) {
@@ -815,7 +834,6 @@ FileManager.prototype = /** @struct */ {
assert(this.volumeManager_);
assert(this.historyLoader_);
assert(this.dialogDom_);
- assert(this.metadataModel_);
// Cache nodes we'll be manipulating.
var dom = this.dialogDom_;

Powered by Google App Engine
This is Rietveld 408576698