| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 /** | 5 /** |
| 6 * Item element of the progress center. | 6 * Item element of the progress center. |
| 7 * @param {Document} document Document which the new item belongs to. | 7 * @param {Document} document Document which the new item belongs to. |
| 8 * @constructor | 8 * @constructor |
| 9 * @extends {HTMLDivElement} | 9 * @extends {HTMLDivElement} |
| 10 */ | 10 */ |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 * Obtains the toggle animation keyframes rule from the document. | 270 * Obtains the toggle animation keyframes rule from the document. |
| 271 * @param {Document} document Document containing the rule. | 271 * @param {Document} document Document containing the rule. |
| 272 * @return {CSSKeyframesRule} Animation rule. | 272 * @return {CSSKeyframesRule} Animation rule. |
| 273 * @private | 273 * @private |
| 274 */ | 274 */ |
| 275 ProgressCenterPanel.getToggleAnimation_ = function(document) { | 275 ProgressCenterPanel.getToggleAnimation_ = function(document) { |
| 276 for (var i = 0; i < document.styleSheets.length; i++) { | 276 for (var i = 0; i < document.styleSheets.length; i++) { |
| 277 var styleSheet = document.styleSheets[i]; | 277 var styleSheet = document.styleSheets[i]; |
| 278 for (var j = 0; j < styleSheet.cssRules.length; j++) { | 278 for (var j = 0; j < styleSheet.cssRules.length; j++) { |
| 279 var rule = styleSheet.cssRules[j]; | 279 var rule = styleSheet.cssRules[j]; |
| 280 if (rule.type === CSSRule.WEBKIT_KEYFRAMES_RULE && | 280 if (rule.type === CSSRule.KEYFRAMES_RULE && |
| 281 rule.name === 'progress-center-toggle') { | 281 rule.name === 'progress-center-toggle') { |
| 282 return rule; | 282 return rule; |
| 283 } | 283 } |
| 284 } | 284 } |
| 285 } | 285 } |
| 286 throw new Error('The progress-center-toggle rules is not found.'); | 286 throw new Error('The progress-center-toggle rules is not found.'); |
| 287 }; | 287 }; |
| 288 | 288 |
| 289 ProgressCenterPanel.prototype = /** @struct */ { | 289 ProgressCenterPanel.prototype = /** @struct */ { |
| 290 /** | 290 /** |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 | 486 |
| 487 // Cancel button. | 487 // Cancel button. |
| 488 if (event.target.classList.contains('cancel')) { | 488 if (event.target.classList.contains('cancel')) { |
| 489 var itemElement = event.target.parentNode.parentNode; | 489 var itemElement = event.target.parentNode.parentNode; |
| 490 if (this.cancelCallback) { | 490 if (this.cancelCallback) { |
| 491 var id = itemElement.getAttribute('data-progress-id'); | 491 var id = itemElement.getAttribute('data-progress-id'); |
| 492 this.cancelCallback(id); | 492 this.cancelCallback(id); |
| 493 } | 493 } |
| 494 } | 494 } |
| 495 }; | 495 }; |
| OLD | NEW |