| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 // Unhide the regulatory label if/when the image loads. | 159 // Unhide the regulatory label if/when the image loads. |
| 160 $('regulatory-label').onload = function() { | 160 $('regulatory-label').onload = function() { |
| 161 $('regulatory-label-container').hidden = false; | 161 $('regulatory-label-container').hidden = false; |
| 162 }; | 162 }; |
| 163 } | 163 } |
| 164 | 164 |
| 165 var logo = $('product-logo'); | 165 var logo = $('product-logo'); |
| 166 logo.onclick = function(e) { | 166 logo.onclick = function(e) { |
| 167 logo.classList.remove('spin'); | 167 logo.classList.remove('spin'); |
| 168 // Force a style recalc that cancels the animation specified by "spin". | 168 setTimeout(function() { logo.classList.add('spin'); }, 0); |
| 169 getComputedStyle(logo).animationName; | |
| 170 logo.classList.add('spin'); | |
| 171 }; | 169 }; |
| 172 | 170 |
| 173 // Attempt to update. | 171 // Attempt to update. |
| 174 chrome.send('onPageLoaded'); | 172 chrome.send('onPageLoaded'); |
| 175 }, | 173 }, |
| 176 | 174 |
| 177 /** @override */ | 175 /** @override */ |
| 178 didClosePage: function() { | 176 didClosePage: function() { |
| 179 this.setMoreInfoVisible_(false); | 177 this.setMoreInfoVisible_(false); |
| 180 }, | 178 }, |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 HelpPage.setRegulatoryLabelText = function(text) { | 671 HelpPage.setRegulatoryLabelText = function(text) { |
| 674 assert(cr.isChromeOS); | 672 assert(cr.isChromeOS); |
| 675 HelpPage.getInstance().setRegulatoryLabelText_(text); | 673 HelpPage.getInstance().setRegulatoryLabelText_(text); |
| 676 }; | 674 }; |
| 677 | 675 |
| 678 // Export | 676 // Export |
| 679 return { | 677 return { |
| 680 HelpPage: HelpPage | 678 HelpPage: HelpPage |
| 681 }; | 679 }; |
| 682 }); | 680 }); |
| OLD | NEW |