| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 * @fileoverview Polymer element for displaying a summary of network states | 6 * @fileoverview Polymer element for displaying a summary of network states |
| 7 * by type: Ethernet, WiFi, Cellular, WiMAX, and VPN. | 7 * by type: Ethernet, WiFi, Cellular, WiMAX, and VPN. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 /** @typedef {chrome.networkingPrivate.DeviceStateProperties} */ | 10 /** @typedef {chrome.networkingPrivate.DeviceStateProperties} */ |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 newDeviceStates.VPN = /** @type {DeviceStateProperties} */ ({ | 393 newDeviceStates.VPN = /** @type {DeviceStateProperties} */ ({ |
| 394 Type: CrOnc.Type.VPN, | 394 Type: CrOnc.Type.VPN, |
| 395 State: chrome.networkingPrivate.DeviceStateType.ENABLED | 395 State: chrome.networkingPrivate.DeviceStateType.ENABLED |
| 396 }); | 396 }); |
| 397 } | 397 } |
| 398 | 398 |
| 399 this.deviceStates = newDeviceStates; | 399 this.deviceStates = newDeviceStates; |
| 400 }, | 400 }, |
| 401 | 401 |
| 402 /** | 402 /** |
| 403 * Sets 'networkStates[type]' which will update the cr-network-list-item | 403 * Sets 'networkStates[type]' which will update the |
| 404 * associated with 'type'. | 404 * cr-network-list-network-item associated with 'type'. |
| 405 * @param {string} type The network type. | 405 * @param {string} type The network type. |
| 406 * @param {!CrOnc.NetworkStateProperties|undefined} state The state properties | 406 * @param {!CrOnc.NetworkStateProperties|undefined} state The state properties |
| 407 * for the network to associate with |type|. May be undefined if there are | 407 * for the network to associate with |type|. May be undefined if there are |
| 408 * no networks matching |type|. | 408 * no networks matching |type|. |
| 409 * @private | 409 * @private |
| 410 */ | 410 */ |
| 411 updateNetworkState_: function(type, state) { | 411 updateNetworkState_: function(type, state) { |
| 412 this.set('networkStates.' + type, state); | 412 this.set('networkStates.' + type, state); |
| 413 if (state) | 413 if (state) |
| 414 this.networkIds_[state.GUID] = true; | 414 this.networkIds_[state.GUID] = true; |
| 415 }, | 415 }, |
| 416 }); | 416 }); |
| 417 })(); | 417 })(); |
| OLD | NEW |