| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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('options.proxyexceptions', function() { | 5 cr.define('options.proxyexceptions', function() { |
| 6 /** @const */ var List = cr.ui.List; | 6 /** @const */ var List = cr.ui.List; |
| 7 /** @const */ var ListItem = cr.ui.ListItem; | 7 /** @const */ var ListItem = cr.ui.ListItem; |
| 8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; | 8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 var self = this; | 33 var self = this; |
| 34 | 34 |
| 35 // Listens to pref changes. | 35 // Listens to pref changes. |
| 36 Preferences.getInstance().addEventListener(this.pref, | 36 Preferences.getInstance().addEventListener(this.pref, |
| 37 function(event) { | 37 function(event) { |
| 38 self.load_(event.value.value); | 38 self.load_(event.value.value); |
| 39 }); | 39 }); |
| 40 }, | 40 }, |
| 41 | 41 |
| 42 /** |
| 43 * @override |
| 44 * @param {Object} exception |
| 45 */ |
| 42 createItem: function(exception) { | 46 createItem: function(exception) { |
| 43 return new ProxyExceptionsItem(exception); | 47 return new ProxyExceptionsItem(exception); |
| 44 }, | 48 }, |
| 45 | 49 |
| 46 /** | 50 /** |
| 47 * Adds given exception to model and update backend. | 51 * Adds given exception to model and update backend. |
| 48 * @param {Object} exception A exception to be added to exception list. | 52 * @param {Object} exception A exception to be added to exception list. |
| 49 */ | 53 */ |
| 50 addException: function(exception) { | 54 addException: function(exception) { |
| 51 this.dataModel.push(exception); | 55 this.dataModel.push(exception); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 labelException.className = ''; | 135 labelException.className = ''; |
| 132 labelException.textContent = this.exception; | 136 labelException.textContent = this.exception; |
| 133 this.appendChild(labelException); | 137 this.appendChild(labelException); |
| 134 } | 138 } |
| 135 }; | 139 }; |
| 136 | 140 |
| 137 return { | 141 return { |
| 138 ProxyExceptions: ProxyExceptions | 142 ProxyExceptions: ProxyExceptions |
| 139 }; | 143 }; |
| 140 }); | 144 }); |
| OLD | NEW |