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', function() { | 5 cr.define('options', function() { |
6 | 6 |
7 var Page = cr.ui.pageManager.Page; | 7 var Page = cr.ui.pageManager.Page; |
8 var PageManager = cr.ui.pageManager.PageManager; | 8 var PageManager = cr.ui.pageManager.PageManager; |
9 var ArrayDataModel = cr.ui.ArrayDataModel; | 9 var ArrayDataModel = cr.ui.ArrayDataModel; |
10 var DeletableItem = options.DeletableItem; | 10 var DeletableItem = options.DeletableItem; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 list.redraw(); | 43 list.redraw(); |
44 } | 44 } |
45 | 45 |
46 }; | 46 }; |
47 | 47 |
48 /** | 48 /** |
49 * Creates a list entry for a remembered network. | 49 * Creates a list entry for a remembered network. |
50 * @param {{Name: string, Type: string, servicePath: string}} data | 50 * @param {{Name: string, Type: string, servicePath: string}} data |
51 * Description of the network. | 51 * Description of the network. |
52 * @constructor | 52 * @constructor |
| 53 * @extends {options.DeletableItem} |
53 */ | 54 */ |
54 function PreferredNetworkListItem(data) { | 55 function PreferredNetworkListItem(data) { |
55 var el = cr.doc.createElement('div'); | 56 var el = cr.doc.createElement('div'); |
56 el.__proto__ = PreferredNetworkListItem.prototype; | 57 el.__proto__ = PreferredNetworkListItem.prototype; |
57 el.data = {}; | 58 el.data = {}; |
58 for (var key in data) | 59 for (var key in data) |
59 el.data[key] = data[key]; | 60 el.data[key] = data[key]; |
60 el.decorate(); | 61 el.decorate(); |
61 return el; | 62 return el; |
62 } | 63 } |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 this.dataModel.push(data); | 146 this.dataModel.push(data); |
146 } | 147 } |
147 }; | 148 }; |
148 | 149 |
149 // Export | 150 // Export |
150 return { | 151 return { |
151 PreferredNetworks: PreferredNetworks | 152 PreferredNetworks: PreferredNetworks |
152 }; | 153 }; |
153 | 154 |
154 }); | 155 }); |
OLD | NEW |