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

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

Issue 2540863004: Quick View: Support pdf and text preview. (Closed)
Patch Set: Fix nits. 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
Index: ui/file_manager/file_manager/foreground/elements/files_quick_view.js
diff --git a/ui/file_manager/file_manager/foreground/elements/files_quick_view.js b/ui/file_manager/file_manager/foreground/elements/files_quick_view.js
index f887b5e3858ad252839e30f4901dc5dd95a99c42..c551cd52777480bcfa84d1b1a9538b6706f78a75 100644
--- a/ui/file_manager/file_manager/foreground/elements/files_quick_view.js
+++ b/ui/file_manager/file_manager/foreground/elements/files_quick_view.js
@@ -15,6 +15,10 @@ var FilesQuickView = Polymer({
videoPoster: String,
audioArtwork: String,
autoplay: Boolean,
+ // True if this file is not image, audio nor video but supported on Chrome,
+ // i.e. preview-able by directly src-ing the file path to webview.
+ // Example: pdf, text.
+ browsable: Boolean,
// metadata-box-active-changed event is fired on attribute change.
metadataBoxActive: {
@@ -41,6 +45,7 @@ var FilesQuickView = Polymer({
this.videoPoster = '';
this.audioArtwork = '';
this.autoplay = false;
+ this.browsable = false;
},
// Opens the dialog.
@@ -154,8 +159,9 @@ var FilesQuickView = Polymer({
*
* @private
*/
- isUnsupported_: function(type) {
- return !this.isImage_(type) && !this.isVideo_(type) && !this.isAudio_(type);
+ isUnsupported_: function(type, browsable) {
+ return !this.isImage_(type) && !this.isVideo_(type) &&
+ !this.isAudio_(type) && !browsable;
},
});

Powered by Google App Engine
This is Rietveld 408576698