| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 new CustomEvent('deleteExtensionError', | 105 new CustomEvent('deleteExtensionError', |
| 106 {bubbles: true, detail: this.error})); | 106 {bubbles: true, detail: this.error})); |
| 107 }.bind(this)); | 107 }.bind(this)); |
| 108 | 108 |
| 109 this.addEventListener('click', function(e) { | 109 this.addEventListener('click', function(e) { |
| 110 if (e.target != deleteButton) | 110 if (e.target != deleteButton) |
| 111 this.requestActive_(); | 111 this.requestActive_(); |
| 112 }.bind(this)); | 112 }.bind(this)); |
| 113 | 113 |
| 114 this.addEventListener('keydown', function(e) { | 114 this.addEventListener('keydown', function(e) { |
| 115 if (e.keyIdentifier == 'Enter' && e.target != deleteButton) | 115 if (e.key == 'Enter' && e.target != deleteButton) |
| 116 this.requestActive_(); | 116 this.requestActive_(); |
| 117 }); | 117 }); |
| 118 }, | 118 }, |
| 119 | 119 |
| 120 /** | 120 /** |
| 121 * Bubble up an event to request to become active. | 121 * Bubble up an event to request to become active. |
| 122 * @private | 122 * @private |
| 123 */ | 123 */ |
| 124 requestActive_: function() { | 124 requestActive_: function() { |
| 125 this.dispatchEvent( | 125 this.dispatchEvent( |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 this.dispatchEvent( | 367 this.dispatchEvent( |
| 368 new CustomEvent('activeExtensionErrorChanged', | 368 new CustomEvent('activeExtensionErrorChanged', |
| 369 {bubbles: true, detail: node ? node.error : null})); | 369 {bubbles: true, detail: node ? node.error : null})); |
| 370 }, | 370 }, |
| 371 }; | 371 }; |
| 372 | 372 |
| 373 return { | 373 return { |
| 374 ExtensionErrorList: ExtensionErrorList | 374 ExtensionErrorList: ExtensionErrorList |
| 375 }; | 375 }; |
| 376 }); | 376 }); |
| OLD | NEW |