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); |
+} |