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 /** | 5 /** |
6 * Partial definition of the result of networkingPrivate.getProperties()). | 6 * Partial definition of the result of networkingPrivate.getProperties()). |
7 * TODO(stevenjb): Replace with chrome.networkingPrivate.NetworkStateProperties | 7 * TODO(stevenjb): Replace with chrome.networkingPrivate.NetworkStateProperties |
8 * once that is fully speced. | 8 * once that is fully speced. |
9 * @typedef {{ | 9 * @typedef {{ |
10 * ConnectionState: string, | 10 * ConnectionState: string, |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 }, | 236 }, |
237 | 237 |
238 /** | 238 /** |
239 * Sets the icon based on a network type or a special type indecator, e.g. | 239 * Sets the icon based on a network type or a special type indecator, e.g. |
240 * 'add-connection' | 240 * 'add-connection' |
241 * @type {string} | 241 * @type {string} |
242 */ | 242 */ |
243 set iconType(type) { | 243 set iconType(type) { |
244 if (isNetworkType(type)) { | 244 if (isNetworkType(type)) { |
245 var networkIcon = this.getNetworkIcon(); | 245 var networkIcon = this.getNetworkIcon(); |
246 networkIcon.networkType = type; | 246 networkIcon.networkState = { |
| 247 GUID: '', |
| 248 Type: /** @type {CrOnc.Type} */ (type), |
| 249 }; |
247 } else { | 250 } else { |
248 // Special cases. e.g. 'add-connection'. Background images are | 251 // Special cases. e.g. 'add-connection'. Background images are |
249 // defined in browser_options.css. | 252 // defined in browser_options.css. |
250 var oldIcon = /** @type {CrNetworkIconElement} */ ( | 253 var oldIcon = /** @type {CrNetworkIconElement} */ ( |
251 this.iconDiv_.querySelector('cr-network-icon')); | 254 this.iconDiv_.querySelector('cr-network-icon')); |
252 if (oldIcon) | 255 if (oldIcon) |
253 this.iconDiv_.removeChild(oldIcon); | 256 this.iconDiv_.removeChild(oldIcon); |
254 this.iconDiv_.classList.add('network-' + type.toLowerCase()); | 257 this.iconDiv_.classList.add('network-' + type.toLowerCase()); |
255 } | 258 } |
256 }, | 259 }, |
(...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1572 /** | 1575 /** |
1573 * Whether the Network list is disabled. Only used for display purpose. | 1576 * Whether the Network list is disabled. Only used for display purpose. |
1574 */ | 1577 */ |
1575 cr.defineProperty(NetworkList, 'disabled', cr.PropertyKind.BOOL_ATTR); | 1578 cr.defineProperty(NetworkList, 'disabled', cr.PropertyKind.BOOL_ATTR); |
1576 | 1579 |
1577 // Export | 1580 // Export |
1578 return { | 1581 return { |
1579 NetworkList: NetworkList | 1582 NetworkList: NetworkList |
1580 }; | 1583 }; |
1581 }); | 1584 }); |
OLD | NEW |