| 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 cr.define('extensions', function() { | 5 cr.define('extensions', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Clone a template within the extension error template collection. | 9 * Clone a template within the extension error template collection. |
| 10 * @param {string} templateName The class name of the template to clone. | 10 * @param {string} templateName The class name of the template to clone. |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 222 |
| 223 /** | 223 /** |
| 224 * Adds an error to the list. | 224 * Adds an error to the list. |
| 225 * @param {(RuntimeError|ManifestError)} error The error to add. | 225 * @param {(RuntimeError|ManifestError)} error The error to add. |
| 226 * @private | 226 * @private |
| 227 */ | 227 */ |
| 228 addError_: function(error) { | 228 addError_: function(error) { |
| 229 this.querySelector('#no-errors-span').hidden = true; | 229 this.querySelector('#no-errors-span').hidden = true; |
| 230 this.errors_.push(error); | 230 this.errors_.push(error); |
| 231 var focusRow = new ExtensionError(error, this.listContents_); | 231 var focusRow = new ExtensionError(error, this.listContents_); |
| 232 this.listContents_.appendChild(document.createElement('li')). | 232 this.listContents_.appendChild(focusRow); |
| 233 appendChild(focusRow); | |
| 234 this.focusGrid_.addRow(focusRow); | 233 this.focusGrid_.addRow(focusRow); |
| 235 }, | 234 }, |
| 236 | 235 |
| 237 /** | 236 /** |
| 238 * Removes an error from the list. | 237 * Removes an error from the list. |
| 239 * @param {(RuntimeError|ManifestError)} error The error to remove. | 238 * @param {(RuntimeError|ManifestError)} error The error to remove. |
| 240 * @private | 239 * @private |
| 241 */ | 240 */ |
| 242 removeError_: function(error) { | 241 removeError_: function(error) { |
| 243 var index = 0; | 242 var index = 0; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 onFocus_: function() { | 374 onFocus_: function() { |
| 376 var activeRow = this.listContents_.querySelector('.focus-row-active'); | 375 var activeRow = this.listContents_.querySelector('.focus-row-active'); |
| 377 activeRow.getEquivalentElement(null).focus(); | 376 activeRow.getEquivalentElement(null).focus(); |
| 378 }, | 377 }, |
| 379 }; | 378 }; |
| 380 | 379 |
| 381 return { | 380 return { |
| 382 ExtensionErrorList: ExtensionErrorList | 381 ExtensionErrorList: ExtensionErrorList |
| 383 }; | 382 }; |
| 384 }); | 383 }); |
| OLD | NEW |