summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormtomasz@chromium.org <mtomasz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-24 09:49:54 +0000
committermtomasz@chromium.org <mtomasz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-24 09:49:54 +0000
commit6649bbf11563ea50eb7a44cf985538987ad7d812 (patch)
tree7eeb94cfc972b655ed03b3e9306eef3086b2d8c2
parentb128f7f77c10ef5b8c660e5bc69deafe7ba18c13 (diff)
downloadchromium_src-6649bbf11563ea50eb7a44cf985538987ad7d812.zip
chromium_src-6649bbf11563ea50eb7a44cf985538987ad7d812.tar.gz
chromium_src-6649bbf11563ea50eb7a44cf985538987ad7d812.tar.bz2
Show the spinner during initialization.
Sometimes initialization takes time. In such case we should show the spinner to give some feedback to the user, that something is going on. This patch enables the spinner as soon as the spinner dom is available. TEST=Run Files.app, verify that the spinner appears early. BUG=251050 R=hirono@chromium.org Review URL: https://codereview.chromium.org/17568012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208182 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/resources/file_manager/js/file_manager.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
index 41a039f..b013c8f 100644
--- a/chrome/browser/resources/file_manager/js/file_manager.js
+++ b/chrome/browser/resources/file_manager/js/file_manager.js
@@ -896,7 +896,7 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
this.table_ = dom.querySelector('.detail-table');
this.grid_ = dom.querySelector('.thumbnail-grid');
this.spinner_ = dom.querySelector('#spinner-with-text');
- this.showSpinner_(false);
+ this.showSpinner_(true);
this.searchBreadcrumbs_ = new BreadcrumbsController(
dom.querySelector('#search-breadcrumbs'), this.metadataCache_);
@@ -2614,15 +2614,18 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
clearTimeout(this.scanCompletedTimer_);
this.scanCompletedTimer_ = null;
}
+
if (this.scanUpdatedTimer_) {
clearTimeout(this.scanUpdatedTimer_);
this.scanUpdatedTimer_ = null;
}
- this.cancelSpinnerTimeout_();
- this.showSpinner_(false);
- this.showSpinnerTimeout_ =
- setTimeout(this.showSpinner_.bind(this, true), 500);
+ if (!this.spinner_.hidden) {
+ this.cancelSpinnerTimeout_();
+ this.showSpinner_(false);
+ this.showSpinnerTimeout_ =
+ setTimeout(this.showSpinner_.bind(this, true), 500);
+ }
};
/**