| 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 * @typedef {{ | 7 * @typedef {{ |
| 8 * ConnectionState: string, | 8 * ConnectionState: string, |
| 9 * Cellular: { | 9 * Cellular: { |
| 10 * Family: ?string, | 10 * Family: ?string, |
| (...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 prefs.addEventListener('cros.signed.data_roaming_enabled', | 889 prefs.addEventListener('cros.signed.data_roaming_enabled', |
| 890 function(event) { | 890 function(event) { |
| 891 enableDataRoaming_ = event.value.value; | 891 enableDataRoaming_ = event.value.value; |
| 892 }); | 892 }); |
| 893 this.endBatchUpdates(); | 893 this.endBatchUpdates(); |
| 894 | 894 |
| 895 this.onNetworkListChanged_(); // Trigger an initial network update | 895 this.onNetworkListChanged_(); // Trigger an initial network update |
| 896 | 896 |
| 897 chrome.networkingPrivate.onNetworkListChanged.addListener( | 897 chrome.networkingPrivate.onNetworkListChanged.addListener( |
| 898 this.onNetworkListChanged_.bind(this)); | 898 this.onNetworkListChanged_.bind(this)); |
| 899 chrome.networkingPrivate.onDeviceStateListChanged.addListener( |
| 900 this.onNetworkListChanged_.bind(this)); |
| 899 | 901 |
| 900 chrome.networkingPrivate.requestNetworkScan(); | 902 chrome.networkingPrivate.requestNetworkScan(); |
| 901 | 903 |
| 902 options.VPNProviders.addObserver(this.onVPNProvidersChanged_.bind(this)); | 904 options.VPNProviders.addObserver(this.onVPNProvidersChanged_.bind(this)); |
| 903 }, | 905 }, |
| 904 | 906 |
| 905 /** | 907 /** |
| 906 * networkingPrivate event called when the network list has changed. | 908 * networkingPrivate event called when the network list has changed. |
| 907 */ | 909 */ |
| 908 onNetworkListChanged_: function() { | 910 onNetworkListChanged_: function() { |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1421 /** | 1423 /** |
| 1422 * Whether the Network list is disabled. Only used for display purpose. | 1424 * Whether the Network list is disabled. Only used for display purpose. |
| 1423 */ | 1425 */ |
| 1424 cr.defineProperty(NetworkList, 'disabled', cr.PropertyKind.BOOL_ATTR); | 1426 cr.defineProperty(NetworkList, 'disabled', cr.PropertyKind.BOOL_ATTR); |
| 1425 | 1427 |
| 1426 // Export | 1428 // Export |
| 1427 return { | 1429 return { |
| 1428 NetworkList: NetworkList | 1430 NetworkList: NetworkList |
| 1429 }; | 1431 }; |
| 1430 }); | 1432 }); |
| OLD | NEW |