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 16 matching lines...) Expand all Loading... |
27 // HACK(arv): http://crbug.com/40902 | 27 // HACK(arv): http://crbug.com/40902 |
28 window.addEventListener('resize', this.redraw.bind(this)); | 28 window.addEventListener('resize', this.redraw.bind(this)); |
29 | 29 |
30 this.addEventListener('click', this.handleClick_); | 30 this.addEventListener('click', this.handleClick_); |
31 | 31 |
32 var self = this; | 32 var self = this; |
33 | 33 |
34 // Listens to pref changes. | 34 // Listens to pref changes. |
35 Preferences.getInstance().addEventListener(this.pref, | 35 Preferences.getInstance().addEventListener(this.pref, |
36 function(event) { | 36 function(event) { |
37 self.load_(event.value); | 37 self.load_(event.value.value); |
38 }); | 38 }); |
39 }, | 39 }, |
40 | 40 |
41 createItem: function(exception) { | 41 createItem: function(exception) { |
42 return new ProxyExceptionsItem(exception); | 42 return new ProxyExceptionsItem(exception); |
43 }, | 43 }, |
44 | 44 |
45 /** | 45 /** |
46 * Adds given exception to model and update backend. | 46 * Adds given exception to model and update backend. |
47 * @param {Object} exception A exception to be added to exception list. | 47 * @param {Object} exception A exception to be added to exception list. |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 labelException.className = ''; | 130 labelException.className = ''; |
131 labelException.textContent = this.exception; | 131 labelException.textContent = this.exception; |
132 this.appendChild(labelException); | 132 this.appendChild(labelException); |
133 } | 133 } |
134 }; | 134 }; |
135 | 135 |
136 return { | 136 return { |
137 ProxyExceptions: ProxyExceptions | 137 ProxyExceptions: ProxyExceptions |
138 }; | 138 }; |
139 }); | 139 }); |
OLD | NEW |