OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 cr.define('help', function() { | 5 cr.define('help', function() { |
6 var Page = cr.ui.pageManager.Page; | 6 var Page = cr.ui.pageManager.Page; |
7 var PageManager = cr.ui.pageManager.PageManager; | 7 var PageManager = cr.ui.pageManager.PageManager; |
8 | 8 |
9 /** | 9 /** |
10 * Encapsulated handling of the About page. Called 'help' internally to avoid | 10 * Encapsulated handling of the About page. Called 'help' internally to avoid |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 bubble.anchorNode = $('controlled-feature-icon'); | 190 bubble.anchorNode = $('controlled-feature-icon'); |
191 bubble.domSibling = $('controlled-feature-icon'); | 191 bubble.domSibling = $('controlled-feature-icon'); |
192 bubble.arrowLocation = cr.ui.ArrowLocation.TOP_END; | 192 bubble.arrowLocation = cr.ui.ArrowLocation.TOP_END; |
193 bubble.content = content; | 193 bubble.content = content; |
194 bubble.show(); | 194 bubble.show(); |
195 }; | 195 }; |
196 } | 196 } |
197 | 197 |
198 var logo = $('product-logo'); | 198 var logo = $('product-logo'); |
199 logo.onclick = function(e) { | 199 logo.onclick = function(e) { |
200 logo.classList.remove('spin'); | 200 logo.animate({ |
201 // Force a style recalc that cancels the animation specified by "spin". | 201 transform: ['none', 'rotate(-10turn)'], |
202 getComputedStyle(logo).getPropertyValue('animation-name'); | 202 }, /** @type {!KeyframeEffectOptions} */({ |
203 logo.classList.add('spin'); | 203 duration: 500, |
| 204 easing: 'cubic-bezier(1, 0, 0, 1)', |
| 205 })); |
204 }; | 206 }; |
205 | 207 |
206 // Attempt to update. | 208 // Attempt to update. |
207 chrome.send('onPageLoaded'); | 209 chrome.send('onPageLoaded'); |
208 }, | 210 }, |
209 | 211 |
210 /** @override */ | 212 /** @override */ |
211 didClosePage: function() { | 213 didClosePage: function() { |
212 this.setMoreInfoVisible_(false); | 214 this.setMoreInfoVisible_(false); |
213 }, | 215 }, |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 HelpPage.updateEolMessage = function(eolStatus, eolMessage) { | 776 HelpPage.updateEolMessage = function(eolStatus, eolMessage) { |
775 assert(cr.isChromeOS); | 777 assert(cr.isChromeOS); |
776 HelpPage.getInstance().updateEolMessage_(eolStatus, eolMessage); | 778 HelpPage.getInstance().updateEolMessage_(eolStatus, eolMessage); |
777 }; | 779 }; |
778 | 780 |
779 // Export | 781 // Export |
780 return { | 782 return { |
781 HelpPage: HelpPage | 783 HelpPage: HelpPage |
782 }; | 784 }; |
783 }); | 785 }); |
OLD | NEW |