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

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

Issue 1174653002: Show progress bar during scanning. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Normalize statics object naming. Created 5 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/import_controller.js
diff --git a/ui/file_manager/file_manager/foreground/js/import_controller.js b/ui/file_manager/file_manager/foreground/js/import_controller.js
index 05a11805ff41919afa5837188a6261a77c2a55d9..e976b567a9288a2e875ac745516c4bc50501c1a7 100644
--- a/ui/file_manager/file_manager/foreground/js/import_controller.js
+++ b/ui/file_manager/file_manager/foreground/js/import_controller.js
@@ -569,6 +569,13 @@ importer.RuntimeCommandWidget = function() {
/** @private {Element} */
this.detailsBanner_ = document.querySelector('#cloud-import-details .banner');
+ /** @private {Element} */
+ this.progressContainer_ =
+ document.querySelector('#cloud-import-details .progress');
+ /** @private {Element} */
+ this.progressBar_ =
+ document.querySelector('#cloud-import-details .progress .value');
+
/** @private {function(!importer.ClickSource)} */
this.clickListener_;
@@ -733,6 +740,7 @@ importer.RuntimeCommandWidget.prototype.update =
this.sideButton_.hidden = false;
this.importButton_.hidden = true;
this.cancelButton_.hidden = false;
+ this.progressContainer_.hidden = true;
this.toolbarIcon_.setAttribute('icon', 'autorenew');
this.statusIcon_.setAttribute('icon', 'autorenew');
@@ -752,6 +760,7 @@ importer.RuntimeCommandWidget.prototype.update =
this.sideButton_.hidden = false;
this.importButton_.hidden = true;
this.cancelButton_.hidden = true;
+ this.progressContainer_.hidden = true;
this.toolbarIcon_.setAttribute('icon', 'cloud-off');
this.statusIcon_.setAttribute('icon', 'image:photo');
@@ -767,6 +776,7 @@ importer.RuntimeCommandWidget.prototype.update =
this.sideButton_.hidden = false;
this.importButton_.hidden = true;
this.cancelButton_.hidden = true;
+ this.progressContainer_.hidden = true;
this.toolbarIcon_.setAttribute('icon', 'cloud-done');
this.statusIcon_.setAttribute('icon', 'cloud-done');
@@ -786,6 +796,7 @@ importer.RuntimeCommandWidget.prototype.update =
this.sideButton_.hidden = false;
this.importButton_.hidden = false;
this.cancelButton_.hidden = true;
+ this.progressContainer_.hidden = true;
this.toolbarIcon_.setAttribute('icon', 'cloud-upload');
this.statusIcon_.setAttribute('icon', 'image:photo');
@@ -805,6 +816,10 @@ importer.RuntimeCommandWidget.prototype.update =
this.importButton_.hidden = true;
// TODO(smckay): implement cancellation for scanning.
this.cancelButton_.hidden = true;
+ this.progressContainer_.hidden = false;
+
+ var stats = opt_scan.getStatistics();
+ this.progressBar_.style.width = stats.progress + '%';
this.toolbarIcon_.setAttribute('icon', 'autorenew');
this.statusIcon_.setAttribute('icon', 'autorenew');

Powered by Google App Engine
This is Rietveld 408576698