| 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 // require: onc_data.js | 5 // require: onc_data.js |
| 6 | 6 |
| 7 // NOTE(stevenjb): This code is in the process of being converted to be | 7 // NOTE(stevenjb): This code is in the process of being converted to be |
| 8 // compatible with the networkingPrivate extension API: | 8 // compatible with the networkingPrivate extension API: |
| 9 // * The network property dictionaries are being converted to use ONC values. | 9 // * The network property dictionaries are being converted to use ONC values. |
| 10 // * chrome.send calls will be replaced with chrome.networkingPrivate calls. | 10 // * chrome.send calls will be replaced with chrome.networkingPrivate calls. |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 Page.prototype.initializePage.call(this); | 205 Page.prototype.initializePage.call(this); |
| 206 this.initializePageContents_(); | 206 this.initializePageContents_(); |
| 207 this.showNetworkDetails_(); | 207 this.showNetworkDetails_(); |
| 208 }, | 208 }, |
| 209 | 209 |
| 210 /** | 210 /** |
| 211 * Auto-activates the network details dialog if network information | 211 * Auto-activates the network details dialog if network information |
| 212 * is included in the URL. | 212 * is included in the URL. |
| 213 */ | 213 */ |
| 214 showNetworkDetails_: function() { | 214 showNetworkDetails_: function() { |
| 215 var servicePath = parseQueryParams(window.location).servicePath; | 215 var guid = parseQueryParams(window.location).guid; |
| 216 if (!servicePath || !servicePath.length) | 216 if (!guid || !guid.length) |
| 217 return; | 217 return; |
| 218 // TODO(stevenjb): chrome.networkingPrivate.getManagedProperties | 218 chrome.networkingPrivate.getManagedProperties( |
| 219 // with initializeDetailsPage as the callback. | 219 guid, DetailsInternetPage.initializeDetailsPage); |
| 220 chrome.send('getManagedProperties', [servicePath]); | |
| 221 }, | 220 }, |
| 222 | 221 |
| 223 /** | 222 /** |
| 224 * Initializes the contents of the page. | 223 * Initializes the contents of the page. |
| 225 */ | 224 */ |
| 226 initializePageContents_: function() { | 225 initializePageContents_: function() { |
| 227 $('details-internet-dismiss').addEventListener('click', function(event) { | 226 $('details-internet-dismiss').addEventListener('click', function(event) { |
| 228 DetailsInternetPage.setDetails(); | 227 DetailsInternetPage.setDetails(); |
| 229 }); | 228 }); |
| 230 | 229 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 244 DetailsInternetPage.setDetails(); | 243 DetailsInternetPage.setDetails(); |
| 245 DetailsInternetPage.configureNetwork(); | 244 DetailsInternetPage.configureNetwork(); |
| 246 }); | 245 }); |
| 247 | 246 |
| 248 $('activate-details').addEventListener('click', function(event) { | 247 $('activate-details').addEventListener('click', function(event) { |
| 249 DetailsInternetPage.activateFromDetails(); | 248 DetailsInternetPage.activateFromDetails(); |
| 250 }); | 249 }); |
| 251 | 250 |
| 252 $('view-account-details').addEventListener('click', function(event) { | 251 $('view-account-details').addEventListener('click', function(event) { |
| 253 chrome.send('showMorePlanInfo', | 252 chrome.send('showMorePlanInfo', |
| 254 [DetailsInternetPage.getInstance().servicePath_]); | 253 [DetailsInternetPage.getInstance().onc_.guid()]); |
| 255 PageManager.closeOverlay(); | 254 PageManager.closeOverlay(); |
| 256 }); | 255 }); |
| 257 | 256 |
| 258 $('cellular-apn-use-default').addEventListener('click', function(event) { | 257 $('cellular-apn-use-default').addEventListener('click', function(event) { |
| 259 DetailsInternetPage.getInstance().setDefaultApn_(); | 258 DetailsInternetPage.getInstance().setDefaultApn_(); |
| 260 }); | 259 }); |
| 261 | 260 |
| 262 $('cellular-apn-set').addEventListener('click', function(event) { | 261 $('cellular-apn-set').addEventListener('click', function(event) { |
| 263 DetailsInternetPage.getInstance().setApn_($('cellular-apn').value); | 262 DetailsInternetPage.getInstance().setApn_($('cellular-apn').value); |
| 264 }); | 263 }); |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 if (apnName) { | 900 if (apnName) { |
| 902 activeApn['AccessPointName'] = apnName; | 901 activeApn['AccessPointName'] = apnName; |
| 903 activeApn['Username'] = stringFromValue(apnValue['Username']); | 902 activeApn['Username'] = stringFromValue(apnValue['Username']); |
| 904 activeApn['Password'] = stringFromValue(apnValue['Password']); | 903 activeApn['Password'] = stringFromValue(apnValue['Password']); |
| 905 } | 904 } |
| 906 // Set the cached ONC data. | 905 // Set the cached ONC data. |
| 907 this.onc_.setProperty('Cellular.APN', activeApn); | 906 this.onc_.setProperty('Cellular.APN', activeApn); |
| 908 // Set an ONC object with just the APN values. | 907 // Set an ONC object with just the APN values. |
| 909 var oncData = new OncData({}); | 908 var oncData = new OncData({}); |
| 910 oncData.setProperty('Cellular.APN', activeApn); | 909 oncData.setProperty('Cellular.APN', activeApn); |
| 911 // TODO(stevenjb): chrome.networkingPrivate.setProperties | 910 chrome.networkingPrivate.setProperties(this.onc_.guid(), |
| 912 chrome.send('setProperties', [this.servicePath_, oncData.getData()]); | 911 oncData.getData()); |
| 913 }, | 912 }, |
| 914 | 913 |
| 915 /** | 914 /** |
| 916 * Event Listener for the cellular-apn-use-default button. | 915 * Event Listener for the cellular-apn-use-default button. |
| 917 * @private | 916 * @private |
| 918 */ | 917 */ |
| 919 setDefaultApn_: function() { | 918 setDefaultApn_: function() { |
| 920 var apnSelector = $('select-apn'); | 919 var apnSelector = $('select-apn'); |
| 921 | 920 |
| 922 // Remove the 'user' entry if it exists. | 921 // Remove the 'user' entry if it exists. |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 DetailsInternetPage.changeCellularButtonsState(visible); | 1046 DetailsInternetPage.changeCellularButtonsState(visible); |
| 1048 }; | 1047 }; |
| 1049 | 1048 |
| 1050 /** | 1049 /** |
| 1051 * Changes the network carrier. | 1050 * Changes the network carrier. |
| 1052 */ | 1051 */ |
| 1053 DetailsInternetPage.handleCarrierChanged = function() { | 1052 DetailsInternetPage.handleCarrierChanged = function() { |
| 1054 var carrierSelector = $('select-carrier'); | 1053 var carrierSelector = $('select-carrier'); |
| 1055 var carrier = carrierSelector[carrierSelector.selectedIndex].textContent; | 1054 var carrier = carrierSelector[carrierSelector.selectedIndex].textContent; |
| 1056 DetailsInternetPage.showCarrierChangeSpinner(true); | 1055 DetailsInternetPage.showCarrierChangeSpinner(true); |
| 1057 chrome.send('setCarrier', [ | 1056 chrome.send('setCarrier', [carrier]); |
| 1058 DetailsInternetPage.getInstance().servicePath_, carrier]); | |
| 1059 }; | 1057 }; |
| 1060 | 1058 |
| 1061 /** | 1059 /** |
| 1062 * Performs minimal initialization of the InternetDetails dialog in | 1060 * Performs minimal initialization of the InternetDetails dialog in |
| 1063 * preparation for showing proxy-settings. | 1061 * preparation for showing proxy-settings. |
| 1064 */ | 1062 */ |
| 1065 DetailsInternetPage.initializeProxySettings = function() { | 1063 DetailsInternetPage.initializeProxySettings = function() { |
| 1066 DetailsInternetPage.getInstance().initializePageContents_(); | 1064 DetailsInternetPage.getInstance().initializePageContents_(); |
| 1067 }; | 1065 }; |
| 1068 | 1066 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1128 DetailsInternetPage.showCarrierChangeSpinner(false); | 1126 DetailsInternetPage.showCarrierChangeSpinner(false); |
| 1129 }; | 1127 }; |
| 1130 | 1128 |
| 1131 DetailsInternetPage.loginFromDetails = function() { | 1129 DetailsInternetPage.loginFromDetails = function() { |
| 1132 var detailsPage = DetailsInternetPage.getInstance(); | 1130 var detailsPage = DetailsInternetPage.getInstance(); |
| 1133 if (detailsPage.type_ == 'WiFi') | 1131 if (detailsPage.type_ == 'WiFi') |
| 1134 sendChromeMetricsAction('Options_NetworkConnectToWifi'); | 1132 sendChromeMetricsAction('Options_NetworkConnectToWifi'); |
| 1135 else if (detailsPage.type_ == 'VPN') | 1133 else if (detailsPage.type_ == 'VPN') |
| 1136 sendChromeMetricsAction('Options_NetworkConnectToVPN'); | 1134 sendChromeMetricsAction('Options_NetworkConnectToVPN'); |
| 1137 // TODO(stevenjb): chrome.networkingPrivate.startConnect | 1135 // TODO(stevenjb): chrome.networkingPrivate.startConnect |
| 1138 chrome.send('startConnect', [detailsPage.servicePath_]); | 1136 chrome.send('startConnect', [detailsPage.onc_.guid()]); |
| 1139 PageManager.closeOverlay(); | 1137 PageManager.closeOverlay(); |
| 1140 }; | 1138 }; |
| 1141 | 1139 |
| 1142 DetailsInternetPage.disconnectNetwork = function() { | 1140 DetailsInternetPage.disconnectNetwork = function() { |
| 1143 var detailsPage = DetailsInternetPage.getInstance(); | 1141 var detailsPage = DetailsInternetPage.getInstance(); |
| 1144 if (detailsPage.type_ == 'WiFi') | 1142 if (detailsPage.type_ == 'WiFi') |
| 1145 sendChromeMetricsAction('Options_NetworkDisconnectWifi'); | 1143 sendChromeMetricsAction('Options_NetworkDisconnectWifi'); |
| 1146 else if (detailsPage.type_ == 'VPN') | 1144 else if (detailsPage.type_ == 'VPN') |
| 1147 sendChromeMetricsAction('Options_NetworkDisconnectVPN'); | 1145 sendChromeMetricsAction('Options_NetworkDisconnectVPN'); |
| 1148 var guid = detailsPage.onc_.getActiveValue('GUID'); | 1146 chrome.networkingPrivate.startDisconnect(detailsPage.onc_.guid()); |
| 1149 chrome.networkingPrivate.startDisconnect(guid); | |
| 1150 PageManager.closeOverlay(); | 1147 PageManager.closeOverlay(); |
| 1151 }; | 1148 }; |
| 1152 | 1149 |
| 1153 DetailsInternetPage.configureNetwork = function() { | 1150 DetailsInternetPage.configureNetwork = function() { |
| 1154 var detailsPage = DetailsInternetPage.getInstance(); | 1151 var detailsPage = DetailsInternetPage.getInstance(); |
| 1155 chrome.send('configureNetwork', [detailsPage.servicePath_]); | 1152 chrome.send('configureNetwork', [detailsPage.onc_.guid()]); |
| 1156 PageManager.closeOverlay(); | 1153 PageManager.closeOverlay(); |
| 1157 }; | 1154 }; |
| 1158 | 1155 |
| 1159 DetailsInternetPage.activateFromDetails = function() { | 1156 DetailsInternetPage.activateFromDetails = function() { |
| 1160 var detailsPage = DetailsInternetPage.getInstance(); | 1157 var detailsPage = DetailsInternetPage.getInstance(); |
| 1161 if (detailsPage.type_ == 'Cellular') { | 1158 if (detailsPage.type_ == 'Cellular') { |
| 1162 chrome.send('activateNetwork', [detailsPage.servicePath_]); | 1159 chrome.send('activateNetwork', [detailsPage.onc_.guid()]); |
| 1163 } | 1160 } |
| 1164 PageManager.closeOverlay(); | 1161 PageManager.closeOverlay(); |
| 1165 }; | 1162 }; |
| 1166 | 1163 |
| 1167 /** | 1164 /** |
| 1168 * Event handler called when the details page is closed. Sends changed | 1165 * Event handler called when the details page is closed. Sends changed |
| 1169 * properties to Chrome and closes the overlay. | 1166 * properties to Chrome and closes the overlay. |
| 1170 */ | 1167 */ |
| 1171 DetailsInternetPage.setDetails = function() { | 1168 DetailsInternetPage.setDetails = function() { |
| 1172 var detailsPage = DetailsInternetPage.getInstance(); | 1169 var detailsPage = DetailsInternetPage.getInstance(); |
| 1173 var type = detailsPage.type_; | 1170 var type = detailsPage.type_; |
| 1174 var servicePath = detailsPage.servicePath_; | |
| 1175 var oncData = new OncData({}); | 1171 var oncData = new OncData({}); |
| 1176 var autoConnectCheckboxId = ''; | 1172 var autoConnectCheckboxId = ''; |
| 1177 if (type == 'WiFi') { | 1173 if (type == 'WiFi') { |
| 1178 var preferredCheckbox = | 1174 var preferredCheckbox = |
| 1179 assertInstanceof($('prefer-network-wifi'), HTMLInputElement); | 1175 assertInstanceof($('prefer-network-wifi'), HTMLInputElement); |
| 1180 if (!preferredCheckbox.hidden && !preferredCheckbox.disabled) { | 1176 if (!preferredCheckbox.hidden && !preferredCheckbox.disabled) { |
| 1181 var kPreferredPriority = 1; | 1177 var kPreferredPriority = 1; |
| 1182 var priority = preferredCheckbox.checked ? kPreferredPriority : 0; | 1178 var priority = preferredCheckbox.checked ? kPreferredPriority : 0; |
| 1183 oncData.setProperty('Priority', priority); | 1179 oncData.setProperty('Priority', priority); |
| 1184 sendChromeMetricsAction('Options_NetworkSetPrefer'); | 1180 sendChromeMetricsAction('Options_NetworkSetPrefer'); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1213 var ipConfig = detailsPage.getIpConfig_(nameServerType); | 1209 var ipConfig = detailsPage.getIpConfig_(nameServerType); |
| 1214 var ipAddressType = ('IPAddress' in ipConfig) ? 'Static' : 'DHCP'; | 1210 var ipAddressType = ('IPAddress' in ipConfig) ? 'Static' : 'DHCP'; |
| 1215 var nameServersType = ('NameServers' in ipConfig) ? 'Static' : 'DHCP'; | 1211 var nameServersType = ('NameServers' in ipConfig) ? 'Static' : 'DHCP'; |
| 1216 oncData.setProperty('IPAddressConfigType', ipAddressType); | 1212 oncData.setProperty('IPAddressConfigType', ipAddressType); |
| 1217 oncData.setProperty('NameServersConfigType', nameServersType); | 1213 oncData.setProperty('NameServersConfigType', nameServersType); |
| 1218 oncData.setProperty('StaticIPConfig', ipConfig); | 1214 oncData.setProperty('StaticIPConfig', ipConfig); |
| 1219 | 1215 |
| 1220 var data = oncData.getData(); | 1216 var data = oncData.getData(); |
| 1221 if (Object.keys(data).length > 0) { | 1217 if (Object.keys(data).length > 0) { |
| 1222 // TODO(stevenjb): Only set changed properties. | 1218 // TODO(stevenjb): Only set changed properties. |
| 1223 // TODO(stevenjb): chrome.networkingPrivate.setProperties | 1219 chrome.networkingPrivate.setProperties(detailsPage.onc_.guid(), data); |
| 1224 chrome.send('setProperties', [servicePath, data]); | |
| 1225 } | 1220 } |
| 1226 | 1221 |
| 1227 PageManager.closeOverlay(); | 1222 PageManager.closeOverlay(); |
| 1228 }; | 1223 }; |
| 1229 | 1224 |
| 1230 /** | 1225 /** |
| 1231 * Event handler called when the name server type changes. | 1226 * Event handler called when the name server type changes. |
| 1232 * @param {string} type The selected name sever type, 'automatic', 'google', | 1227 * @param {string} type The selected name sever type, 'automatic', 'google', |
| 1233 * or 'user'. | 1228 * or 'user'. |
| 1234 */ | 1229 */ |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1267 /** | 1262 /** |
| 1268 * Method called from Chrome when the ONC properties for the displayed | 1263 * Method called from Chrome when the ONC properties for the displayed |
| 1269 * network may have changed. | 1264 * network may have changed. |
| 1270 * @param {Object} oncData The updated ONC dictionary for the network. | 1265 * @param {Object} oncData The updated ONC dictionary for the network. |
| 1271 */ | 1266 */ |
| 1272 DetailsInternetPage.updateConnectionData = function(oncData) { | 1267 DetailsInternetPage.updateConnectionData = function(oncData) { |
| 1273 var detailsPage = DetailsInternetPage.getInstance(); | 1268 var detailsPage = DetailsInternetPage.getInstance(); |
| 1274 if (!detailsPage.visible) | 1269 if (!detailsPage.visible) |
| 1275 return; | 1270 return; |
| 1276 | 1271 |
| 1277 if (oncData.servicePath != detailsPage.servicePath_) | 1272 if (oncData.GUID != detailsPage.onc_.guid()) |
| 1278 return; | 1273 return; |
| 1279 | 1274 |
| 1280 // Update our cached data object. | 1275 // Update our cached data object. |
| 1281 detailsPage.onc_ = new OncData(oncData); | 1276 detailsPage.onc_ = new OncData(oncData); |
| 1282 | 1277 |
| 1283 detailsPage.populateHeader_(); | 1278 detailsPage.populateHeader_(); |
| 1284 detailsPage.updateConnectionButtonVisibilty_(); | 1279 detailsPage.updateConnectionButtonVisibilty_(); |
| 1285 detailsPage.updateDetails_(); | 1280 detailsPage.updateDetails_(); |
| 1286 }; | 1281 }; |
| 1287 | 1282 |
| 1288 /** | 1283 /** |
| 1289 * Method called from Chrome in response to getManagedProperties. | 1284 * Method called from Chrome in response to getManagedProperties. |
| 1290 * We only use this when we want to call initializeDetailsPage. | 1285 * We only use this when we want to call initializeDetailsPage. |
| 1291 * TODO(stevenjb): Eliminate when we switch to networkingPrivate | 1286 * TODO(stevenjb): Eliminate when we switch to networkingPrivate |
| 1292 * (initializeDetailsPage will be provided as the callback). | 1287 * (initializeDetailsPage will be provided as the callback). |
| 1293 * @param {Object} oncData Dictionary of ONC properties. | 1288 * @param {Object} oncData Dictionary of ONC properties. |
| 1294 */ | 1289 */ |
| 1295 DetailsInternetPage.getManagedPropertiesResult = function(oncData) { | 1290 DetailsInternetPage.getManagedPropertiesResult = function(oncData) { |
| 1296 DetailsInternetPage.initializeDetailsPage(oncData); | 1291 DetailsInternetPage.initializeDetailsPage(oncData); |
| 1297 }; | 1292 }; |
| 1298 | 1293 |
| 1299 /** | 1294 /** |
| 1300 * Initializes the details page with the provided ONC data. | 1295 * Initializes the details page with the provided ONC data. |
| 1301 * @param {Object} oncData Dictionary of ONC properties. | 1296 * @param {Object} oncData Dictionary of ONC properties. |
| 1302 */ | 1297 */ |
| 1303 DetailsInternetPage.initializeDetailsPage = function(oncData) { | 1298 DetailsInternetPage.initializeDetailsPage = function(oncData) { |
| 1304 var onc = new OncData(oncData); | 1299 var onc = new OncData(oncData); |
| 1305 | 1300 |
| 1306 var detailsPage = DetailsInternetPage.getInstance(); | 1301 var detailsPage = DetailsInternetPage.getInstance(); |
| 1307 detailsPage.servicePath_ = oncData.servicePath; | |
| 1308 detailsPage.onc_ = onc; | 1302 detailsPage.onc_ = onc; |
| 1309 var type = onc.getActiveValue('Type'); | 1303 var type = onc.getActiveValue('Type'); |
| 1310 detailsPage.type_ = type; | 1304 detailsPage.type_ = type; |
| 1311 | 1305 |
| 1312 sendShowDetailsMetrics(type, onc.getActiveValue('ConnectionState')); | 1306 sendShowDetailsMetrics(type, onc.getActiveValue('ConnectionState')); |
| 1313 | 1307 |
| 1314 detailsPage.populateHeader_(); | 1308 detailsPage.populateHeader_(); |
| 1315 detailsPage.updateConnectionButtonVisibilty_(); | 1309 detailsPage.updateConnectionButtonVisibilty_(); |
| 1316 detailsPage.updateDetails_(); | 1310 detailsPage.updateDetails_(); |
| 1317 | 1311 |
| 1318 // TODO(stevenjb): Some of the setup below should be moved to | 1312 // TODO(stevenjb): Some of the setup below should be moved to |
| 1319 // updateDetails_() so that updates are reflected in the UI. | 1313 // updateDetails_() so that updates are reflected in the UI. |
| 1320 | 1314 |
| 1321 // Only show proxy for remembered networks. | 1315 // Only show proxy for remembered networks. |
| 1322 var remembered = onc.getSource() != 'None'; | 1316 var remembered = onc.getSource() != 'None'; |
| 1323 if (remembered) { | 1317 if (remembered) { |
| 1324 detailsPage.showProxy_ = true; | 1318 detailsPage.showProxy_ = true; |
| 1325 // Inform Chrome which network to use for proxy configuration. | 1319 // Inform Chrome which network to use for proxy configuration. |
| 1326 chrome.send('selectNetwork', [detailsPage.servicePath_]); | 1320 chrome.send('selectNetwork', [detailsPage.onc_.guid()]); |
| 1327 } else { | 1321 } else { |
| 1328 detailsPage.showProxy_ = false; | 1322 detailsPage.showProxy_ = false; |
| 1329 } | 1323 } |
| 1330 | 1324 |
| 1331 $('web-proxy-auto-discovery').hidden = true; | 1325 $('web-proxy-auto-discovery').hidden = true; |
| 1332 | 1326 |
| 1333 var restricted = onc.getActiveValue('RestrictedConnectivity'); | 1327 var restricted = onc.getActiveValue('RestrictedConnectivity'); |
| 1334 var restrictedString = loadTimeData.getString( | 1328 var restrictedString = loadTimeData.getString( |
| 1335 restricted ? 'restrictedYes' : 'restrictedNo'); | 1329 restricted ? 'restrictedYes' : 'restrictedNo'); |
| 1336 | 1330 |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1581 var option = document.createElement('option'); | 1575 var option = document.createElement('option'); |
| 1582 option.textContent = supportedCarriers[c2]; | 1576 option.textContent = supportedCarriers[c2]; |
| 1583 carrierSelector.add(option); | 1577 carrierSelector.add(option); |
| 1584 } | 1578 } |
| 1585 carrierSelector.selectedIndex = currentCarrierIndex; | 1579 carrierSelector.selectedIndex = currentCarrierIndex; |
| 1586 } | 1580 } |
| 1587 } | 1581 } |
| 1588 if (currentCarrierIndex == -1) | 1582 if (currentCarrierIndex == -1) |
| 1589 $('service-name').textContent = networkName; | 1583 $('service-name').textContent = networkName; |
| 1590 | 1584 |
| 1585 // TODO(stevenjb): Ideally many of these should be localized. |
| 1591 $('network-technology').textContent = | 1586 $('network-technology').textContent = |
| 1592 onc.getActiveValue('Cellular.NetworkTechnology'); | 1587 onc.getActiveValue('Cellular.NetworkTechnology'); |
| 1593 $('roaming-state').textContent = | 1588 $('roaming-state').textContent = |
| 1594 onc.getTranslatedValue('Cellular.RoamingState'); | 1589 onc.getTranslatedValue('Cellular.RoamingState'); |
| 1595 $('cellular-restricted-connectivity').textContent = restrictedString; | 1590 $('cellular-restricted-connectivity').textContent = restrictedString; |
| 1596 // 'errorMessage' is a non ONC property added by Chrome. | 1591 $('error-state').textContent = onc.getActiveValue('ErrorState'); |
| 1597 $('error-state').textContent = onc.getActiveValue('errorMessage'); | |
| 1598 $('manufacturer').textContent = | 1592 $('manufacturer').textContent = |
| 1599 onc.getActiveValue('Cellular.Manufacturer'); | 1593 onc.getActiveValue('Cellular.Manufacturer'); |
| 1600 $('model-id').textContent = onc.getActiveValue('Cellular.ModelID'); | 1594 $('model-id').textContent = onc.getActiveValue('Cellular.ModelID'); |
| 1601 $('firmware-revision').textContent = | 1595 $('firmware-revision').textContent = |
| 1602 onc.getActiveValue('Cellular.FirmwareRevision'); | 1596 onc.getActiveValue('Cellular.FirmwareRevision'); |
| 1603 $('hardware-revision').textContent = | 1597 $('hardware-revision').textContent = |
| 1604 onc.getActiveValue('Cellular.HardwareRevision'); | 1598 onc.getActiveValue('Cellular.HardwareRevision'); |
| 1605 $('mdn').textContent = onc.getActiveValue('Cellular.MDN'); | 1599 $('mdn').textContent = onc.getActiveValue('Cellular.MDN'); |
| 1606 | 1600 |
| 1607 // Show ServingOperator properties only if available. | 1601 // Show ServingOperator properties only if available. |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1707 | 1701 |
| 1708 // Don't show page name in address bar and in history to prevent people | 1702 // Don't show page name in address bar and in history to prevent people |
| 1709 // navigate here by hand and solve issue with page session restore. | 1703 // navigate here by hand and solve issue with page session restore. |
| 1710 PageManager.showPageByName('detailsInternetPage', false); | 1704 PageManager.showPageByName('detailsInternetPage', false); |
| 1711 }; | 1705 }; |
| 1712 | 1706 |
| 1713 return { | 1707 return { |
| 1714 DetailsInternetPage: DetailsInternetPage | 1708 DetailsInternetPage: DetailsInternetPage |
| 1715 }; | 1709 }; |
| 1716 }); | 1710 }); |
| OLD | NEW |