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

Unified Diff: chrome/browser/resources/print_preview_animations.js

Issue 7057047: Print Preview: Preventing "Preview loading..." animation from rendering when not displayed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing Created 9 years, 7 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 | « chrome/browser/resources/print_preview.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/print_preview_animations.js
diff --git a/chrome/browser/resources/print_preview_animations.js b/chrome/browser/resources/print_preview_animations.js
index 634fe7ac0965826ffde69b1238b6505b6f0504f5..ed92490fee295b26eb54d91e2c4da5585562bbc6 100644
--- a/chrome/browser/resources/print_preview_animations.js
+++ b/chrome/browser/resources/print_preview_animations.js
@@ -44,3 +44,20 @@ function fadeOutElement(el) {
el.classList.add('closing');
el.classList.remove('visible');
}
+
+function showLoadingAnimation() {
+ $('dancing-dots-text').classList.remove('hidden');
+ $('overlay-layer').classList.remove('invisible');
+}
+
+function hideLoadingAnimation() {
+ var overlayLayer = $('overlay-layer');
+ overlayLayer.addEventListener('webkitTransitionEnd', loadingAnimationCleanup);
+ overlayLayer.classList.add('invisible');
+}
+
+function loadingAnimationCleanup() {
+ $('dancing-dots-text').classList.add('hidden');
+ $('overlay-layer').removeEventListener('webkitTransitionEnd',
+ loadingAnimationCleanup);
+}
« no previous file with comments | « chrome/browser/resources/print_preview.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698