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

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

Issue 871563002: Generalize PreviewPanelModel so that it stops to refer specific cloud-import CSS class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 11 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
« no previous file with comments | « no previous file | ui/file_manager/file_manager/foreground/js/preview_panel_model_unittest.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/preview_panel_model.js
diff --git a/ui/file_manager/file_manager/foreground/js/preview_panel_model.js b/ui/file_manager/file_manager/foreground/js/preview_panel_model.js
index b22764871c162bbab4f1baa3347a9dddc961038f..c696ec6eeb8e448f47571d3c281f9537e9f3ed40 100644
--- a/ui/file_manager/file_manager/foreground/js/preview_panel_model.js
+++ b/ui/file_manager/file_manager/foreground/js/preview_panel_model.js
@@ -23,9 +23,9 @@ function PreviewPanelModel(initialVisibilityType) {
* @const
* @private
*/
- this.cloudImportCommands_ = Array.prototype.slice.call(
- document.querySelectorAll('command.cloud-import'));
- cr.ui.decorate('command.cloud-import', cr.ui.Command);
+ this.autoVisibilityCommands_ = Array.prototype.slice.call(
+ document.querySelectorAll('command.auto-visibility'));
+ cr.ui.decorate('command.auto-visibility', cr.ui.Command);
/**
* FileSelection to be displayed.
@@ -42,8 +42,8 @@ function PreviewPanelModel(initialVisibilityType) {
*/
this.visible = false;
- for (var i = 0; i < this.cloudImportCommands_.length; i++) {
- this.cloudImportCommands_[i].addEventListener(
+ for (var i = 0; i < this.autoVisibilityCommands_.length; i++) {
+ this.autoVisibilityCommands_[i].addEventListener(
'hiddenChange', this.updateVisibility_.bind(this));
}
this.updateVisibility_();
@@ -92,7 +92,7 @@ PreviewPanelModel.prototype.updateVisibility_ = function() {
case PreviewPanelModel.VisibilityType.AUTO:
newVisible =
this.selection_.entries.length !== 0 ||
- this.cloudImportCommands_.some(function(command) {
+ this.autoVisibilityCommands_.some(function(command) {
return !command.hidden;
});
break;
« no previous file with comments | « no previous file | ui/file_manager/file_manager/foreground/js/preview_panel_model_unittest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698