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.internet', function() { | 5 cr.define('options.internet', function() { |
6 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
7 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; | 7 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; |
| 8 /** @const */ var IPAddressField = options.internet.IPAddressField; |
8 | 9 |
9 /** | 10 /** |
10 * Network settings constants. These enums must match their C++ | 11 * Network settings constants. These enums must match their C++ |
11 * counterparts. | 12 * counterparts. |
12 */ | 13 */ |
13 function Constants() {} | 14 function Constants() {} |
14 | 15 |
15 // Network types: | 16 // Network types: |
16 Constants.TYPE_UNKNOWN = 0; | 17 Constants.TYPE_UNKNOWN = 0; |
17 Constants.TYPE_ETHERNET = 1; | 18 Constants.TYPE_ETHERNET = 1; |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 // Proxy | 246 // Proxy |
246 options.proxyexceptions.ProxyExceptions.decorate($('ignored-host-list')); | 247 options.proxyexceptions.ProxyExceptions.decorate($('ignored-host-list')); |
247 $('remove-host').addEventListener('click', | 248 $('remove-host').addEventListener('click', |
248 this.handleRemoveProxyExceptions_); | 249 this.handleRemoveProxyExceptions_); |
249 $('add-host').addEventListener('click', this.handleAddProxyException_); | 250 $('add-host').addEventListener('click', this.handleAddProxyException_); |
250 $('direct-proxy').addEventListener('click', this.disableManualProxy_); | 251 $('direct-proxy').addEventListener('click', this.disableManualProxy_); |
251 $('manual-proxy').addEventListener('click', this.enableManualProxy_); | 252 $('manual-proxy').addEventListener('click', this.enableManualProxy_); |
252 $('auto-proxy').addEventListener('click', this.disableManualProxy_); | 253 $('auto-proxy').addEventListener('click', this.disableManualProxy_); |
253 $('proxy-all-protocols').addEventListener('click', | 254 $('proxy-all-protocols').addEventListener('click', |
254 this.toggleSingleProxy_); | 255 this.toggleSingleProxy_); |
| 256 |
255 observePrefsUI($('direct-proxy')); | 257 observePrefsUI($('direct-proxy')); |
256 observePrefsUI($('manual-proxy')); | 258 observePrefsUI($('manual-proxy')); |
257 observePrefsUI($('auto-proxy')); | 259 observePrefsUI($('auto-proxy')); |
258 observePrefsUI($('proxy-all-protocols')); | 260 observePrefsUI($('proxy-all-protocols')); |
| 261 |
| 262 $('ip-automatic-configuration-checkbox').addEventListener('click', |
| 263 this.handleIpAutoConfig_); |
| 264 $('automatic-dns-radio').addEventListener('click', |
| 265 this.handleNameServerTypeChange_); |
| 266 $('google-dns-radio').addEventListener('click', |
| 267 this.handleNameServerTypeChange_); |
| 268 $('user-dns-radio').addEventListener('click', |
| 269 this.handleNameServerTypeChange_); |
259 }, | 270 }, |
260 | 271 |
261 /** | 272 /** |
262 * Handler for "add" event fired from userNameEdit. | 273 * Handler for "add" event fired from userNameEdit. |
263 * @param {Event} e Add event fired from userNameEdit. | 274 * @param {Event} e Add event fired from userNameEdit. |
264 * @private | 275 * @private |
265 */ | 276 */ |
266 handleAddProxyException_: function(e) { | 277 handleAddProxyException_: function(e) { |
267 var exception = $('new-host').value; | 278 var exception = $('new-host').value; |
268 $('new-host').value = ''; | 279 $('new-host').value = ''; |
269 | 280 |
270 exception = exception.trim(); | 281 exception = exception.trim(); |
271 if (exception) | 282 if (exception) |
272 $('ignored-host-list').addException(exception); | 283 $('ignored-host-list').addException(exception); |
273 }, | 284 }, |
274 | 285 |
275 /** | 286 /** |
276 * Handler for when the remove button is clicked | 287 * Handler for when the remove button is clicked |
277 * @param {Event} e The click event. | 288 * @param {Event} e The click event. |
278 * @private | 289 * @private |
279 */ | 290 */ |
280 handleRemoveProxyExceptions_: function(e) { | 291 handleRemoveProxyExceptions_: function(e) { |
281 var selectedItems = $('ignored-host-list').selectedItems; | 292 var selectedItems = $('ignored-host-list').selectedItems; |
282 for (var x = 0; x < selectedItems.length; x++) { | 293 for (var x = 0; x < selectedItems.length; x++) { |
283 $('ignored-host-list').removeException(selectedItems[x]); | 294 $('ignored-host-list').removeException(selectedItems[x]); |
284 } | 295 } |
285 }, | 296 }, |
286 | 297 |
287 /** | 298 /** |
| 299 * Handler for when the IP automatic configuration checkbox is clicked. |
| 300 * @param {Event} e The click event. |
| 301 * @private |
| 302 */ |
| 303 handleIpAutoConfig_: function(e) { |
| 304 var checked = $('ip-automatic-configuration-checkbox').checked; |
| 305 var fields = [$('ip-address'), $('ip-netmask'), $('ip-gateway')]; |
| 306 for (var i = 0; i < fields.length; ++i) { |
| 307 fields[i].editable = !checked; |
| 308 if (checked) { |
| 309 var model = fields[i].model; |
| 310 model.value = model.automatic; |
| 311 fields[i].model = model; |
| 312 } |
| 313 } |
| 314 if (!checked) |
| 315 $('ip-address').focus(); |
| 316 }, |
| 317 |
| 318 /** |
| 319 * Handler for when the name server selection changes. |
| 320 * @param {Event} e The click event. |
| 321 * @private |
| 322 */ |
| 323 handleNameServerTypeChange_: function(event) { |
| 324 var type = event.target.value; |
| 325 DetailsInternetPage.updateNameServerDisplay(type); |
| 326 }, |
| 327 |
| 328 /** |
288 * Update details page controls. | 329 * Update details page controls. |
289 * @private | 330 * @private |
290 */ | 331 */ |
291 updateControls: function() { | 332 updateControls: function() { |
292 // Only show ipconfig section if network is connected OR if nothing on | 333 // Only show ipconfig section if network is connected OR if nothing on |
293 // this device is connected. This is so that you can fix the ip configs | 334 // this device is connected. This is so that you can fix the ip configs |
294 // if you can't connect to any network. | 335 // if you can't connect to any network. |
295 // TODO(chocobo): Once ipconfig is moved to flimflam service objects, | 336 // TODO(chocobo): Once ipconfig is moved to flimflam service objects, |
296 // we need to redo this logic to allow configuration of all networks. | 337 // we need to redo this logic to allow configuration of all networks. |
297 $('ipconfig-section').hidden = !this.connected && this.deviceConnected; | 338 $('ipconfig-section').hidden = !this.connected && this.deviceConnected; |
| 339 $('ipconfig-dns-section').hidden = |
| 340 !this.connected && this.deviceConnected; |
298 | 341 |
299 // Network type related. | 342 // Network type related. |
300 updateHidden('#details-internet-page .cellular-details', !this.cellular); | 343 updateHidden('#details-internet-page .cellular-details', !this.cellular); |
301 updateHidden('#details-internet-page .wifi-details', !this.wireless); | 344 updateHidden('#details-internet-page .wifi-details', !this.wireless); |
302 updateHidden('#details-internet-page .wimax-details', !this.wimax); | 345 updateHidden('#details-internet-page .wimax-details', !this.wimax); |
303 updateHidden('#details-internet-page .vpn-details', !this.vpn); | 346 updateHidden('#details-internet-page .vpn-details', !this.vpn); |
304 updateHidden('#details-internet-page .proxy-details', !this.showProxy); | 347 updateHidden('#details-internet-page .proxy-details', !this.showProxy); |
305 /* Network information merged into the Wifi tab for wireless networks | 348 /* Network information merged into the Wifi tab for wireless networks |
306 unless the option is set for enabling a static IP configuration. */ | 349 unless the option is set for enabling a static IP configuration. */ |
307 updateHidden('#details-internet-page .network-details', | 350 updateHidden('#details-internet-page .network-details', |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 } else if (data.type == Constants.TYPE_WIMAX) { | 578 } else if (data.type == Constants.TYPE_WIMAX) { |
536 chrome.send('setAutoConnect', | 579 chrome.send('setAutoConnect', |
537 [String(servicePath), | 580 [String(servicePath), |
538 $('auto-connect-network-wimax').checked ? 'true' : 'false']); | 581 $('auto-connect-network-wimax').checked ? 'true' : 'false']); |
539 } else if (data.type == Constants.TYPE_CELLULAR) { | 582 } else if (data.type == Constants.TYPE_CELLULAR) { |
540 chrome.send('setAutoConnect', | 583 chrome.send('setAutoConnect', |
541 [String(servicePath), | 584 [String(servicePath), |
542 $('auto-connect-network-cellular').checked ? 'true' : | 585 $('auto-connect-network-cellular').checked ? 'true' : |
543 'false']); | 586 'false']); |
544 } | 587 } |
545 var ipConfigList = $('ip-config-list'); | 588 |
546 chrome.send('setIPConfig', [String(servicePath), | 589 var nameServerTypes = ['automatic', 'google', 'user']; |
547 $('ip-type-dhcp').checked ? 'true' : 'false', | 590 var nameServerType = 'automatic'; |
548 ipConfigList.dataModel.item(0).value, | 591 for (var i = 0; i < nameServerTypes.length; ++i) { |
549 ipConfigList.dataModel.item(1).value, | 592 if ($(nameServerTypes[i] + '-dns-radio').checked) { |
550 ipConfigList.dataModel.item(2).value, | 593 nameServerType = nameServerTypes[i]; |
551 ipConfigList.dataModel.item(3).value]); | 594 break; |
| 595 } |
| 596 } |
| 597 |
| 598 // Skip any empty values. |
| 599 var userNameServers = []; |
| 600 for (var i = 1; i <= 4; ++i) { |
| 601 var nameServerField = $('ipconfig-dns' + i); |
| 602 if (nameServerField && nameServerField.model && |
| 603 nameServerField.model.value) { |
| 604 userNameServers.push(nameServerField.model.value); |
| 605 } |
| 606 } |
| 607 |
| 608 userNameServers = userNameServers.join(','); |
| 609 |
| 610 chrome.send('setIPConfig', |
| 611 [servicePath, |
| 612 Boolean($('ip-automatic-configuration-checkbox').checked), |
| 613 $('ip-address').model.value || '', |
| 614 $('ip-netmask').model.value || '', |
| 615 $('ip-gateway').model.value || '', |
| 616 nameServerType, |
| 617 userNameServers]); |
552 OptionsPage.closeOverlay(); | 618 OptionsPage.closeOverlay(); |
553 }; | 619 }; |
554 | 620 |
| 621 DetailsInternetPage.updateNameServerDisplay = function(type) { |
| 622 var editable = type == 'user'; |
| 623 var fields = [$('ipconfig-dns1'), $('ipconfig-dns2'), |
| 624 $('ipconfig-dns3'), $('ipconfig-dns4')]; |
| 625 for (var i = 0; i < fields.length; ++i) { |
| 626 fields[i].editable = editable; |
| 627 } |
| 628 if (editable) |
| 629 $('ipconfig-dns1').focus(); |
| 630 |
| 631 var automaticDns = $('automatic-dns-display'); |
| 632 var googleDns = $('google-dns-display'); |
| 633 var userDns = $('user-dns-settings'); |
| 634 switch (type) { |
| 635 case 'automatic': |
| 636 automaticDns.setAttribute('selected', ''); |
| 637 googleDns.removeAttribute('selected'); |
| 638 userDns.removeAttribute('selected'); |
| 639 break; |
| 640 case 'google': |
| 641 automaticDns.removeAttribute('selected'); |
| 642 googleDns.setAttribute('selected', ''); |
| 643 userDns.removeAttribute('selected'); |
| 644 break; |
| 645 case 'user': |
| 646 automaticDns.removeAttribute('selected'); |
| 647 googleDns.removeAttribute('selected'); |
| 648 userDns.setAttribute('selected', ''); |
| 649 break; |
| 650 } |
| 651 }; |
| 652 |
555 DetailsInternetPage.showDetailedInfo = function(data) { | 653 DetailsInternetPage.showDetailedInfo = function(data) { |
556 var detailsPage = DetailsInternetPage.getInstance(); | 654 var detailsPage = DetailsInternetPage.getInstance(); |
557 | 655 |
558 // Populate header | 656 // Populate header |
559 $('network-details-title').textContent = data.networkName; | 657 $('network-details-title').textContent = data.networkName; |
560 var statusKey = data.connected ? 'networkConnected' : | 658 var statusKey = data.connected ? 'networkConnected' : |
561 'networkNotConnected'; | 659 'networkNotConnected'; |
562 $('network-details-subtitle-status').textContent = | 660 $('network-details-subtitle-status').textContent = |
563 loadTimeData.getString(statusKey); | 661 loadTimeData.getString(statusKey); |
564 var typeKey = null; | 662 var typeKey = null; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 else | 701 else |
604 $('details-internet-disconnect').hidden = !data.connected; | 702 $('details-internet-disconnect').hidden = !data.connected; |
605 | 703 |
606 detailsPage.deviceConnected = data.deviceConnected; | 704 detailsPage.deviceConnected = data.deviceConnected; |
607 detailsPage.connecting = data.connecting; | 705 detailsPage.connecting = data.connecting; |
608 detailsPage.connected = data.connected; | 706 detailsPage.connected = data.connected; |
609 detailsPage.showProxy = data.showProxy; | 707 detailsPage.showProxy = data.showProxy; |
610 detailsPage.showStaticIPConfig = data.showStaticIPConfig; | 708 detailsPage.showStaticIPConfig = data.showStaticIPConfig; |
611 $('connection-state').textContent = data.connectionState; | 709 $('connection-state').textContent = data.connectionState; |
612 | 710 |
613 var inetAddress = ''; | 711 var ipAutoConfig = data.ipAutoConfig ? 'automatic' : 'user'; |
614 var inetSubnetAddress = ''; | 712 $('ip-automatic-configuration-checkbox').checked = data.ipAutoConfig; |
615 var inetGateway = ''; | 713 var inetAddress = {autoConfig: ipAutoConfig}; |
616 var inetDns = ''; | 714 var inetNetmask = {autoConfig: ipAutoConfig}; |
617 $('ip-type-dhcp').checked = true; | 715 var inetGateway = {autoConfig: ipAutoConfig}; |
618 if (data.ipconfigStatic.value) { | 716 |
619 inetAddress = data.ipconfigStatic.value.address; | 717 if (data.ipconfig.value) { |
620 inetSubnetAddress = data.ipconfigStatic.value.subnetAddress; | 718 inetAddress.automatic = data.ipconfig.value.address; |
621 inetGateway = data.ipconfigStatic.value.gateway; | 719 inetAddress.value = data.ipconfig.value.address; |
622 inetDns = data.ipconfigStatic.value.dns; | 720 inetNetmask.automatic = data.ipconfig.value.netmask; |
623 $('ip-type-static').checked = true; | 721 inetNetmask.value = data.ipconfig.value.netmask; |
624 } else if (data.ipconfigDHCP.value) { | 722 inetGateway.automatic = data.ipconfig.value.gateway; |
625 inetAddress = data.ipconfigDHCP.value.address; | 723 inetGateway.value = data.ipconfig.value.gateway; |
626 inetSubnetAddress = data.ipconfigDHCP.value.subnetAddress; | |
627 inetGateway = data.ipconfigDHCP.value.gateway; | |
628 inetDns = data.ipconfigDHCP.value.dns; | |
629 } | 724 } |
630 | 725 |
631 // Hide the dhcp/static radio if needed. | 726 // Override the "automatic" values with the real saved DHCP values, |
632 $('ip-type-dhcp-div').hidden = !data.showStaticIPConfig; | 727 // if they are set. |
633 $('ip-type-static-div').hidden = !data.showStaticIPConfig; | 728 if (data.savedIP.address) { |
| 729 inetAddress.automatic = data.savedIP.address; |
| 730 inetAddress.value = data.savedIP.address; |
| 731 } |
| 732 if (data.savedIP.netmask) { |
| 733 inetNetmask.automatic = data.savedIP.netmask; |
| 734 inetNetmask.value = data.savedIP.netmask; |
| 735 } |
| 736 if (data.savedIP.gateway) { |
| 737 inetGateway.automatic = data.savedIP.gateway; |
| 738 inetGateway.value = data.savedIP.gateway; |
| 739 } |
634 | 740 |
635 var ipConfigList = $('ip-config-list'); | 741 if (ipAutoConfig == 'user') { |
636 options.internet.IPConfigList.decorate(ipConfigList); | 742 if (data.staticIP.value.address) { |
637 ipConfigList.disabled = | 743 inetAddress.value = data.staticIP.value.address; |
638 $('ip-type-dhcp').checked || data.ipconfigStatic.controlledBy || | 744 inetAddress.user = data.staticIP.value.address; |
639 !data.showStaticIPConfig; | 745 } |
640 ipConfigList.autoExpands = true; | 746 if (data.staticIP.value.netmask) { |
641 var model = new ArrayDataModel([]); | 747 inetNetmask.value = data.staticIP.value.netmask; |
642 model.push({ | 748 inetNetmask.user = data.staticIP.value.netmask; |
643 property: 'inetAddress', | 749 } |
644 name: loadTimeData.getString('inetAddress'), | 750 if (data.staticIP.value.gateway) { |
645 value: inetAddress, | 751 inetGateway.value = data.staticIP.value.gateway; |
646 }); | 752 inetGateway.user = data.staticIP.value.gateway; |
647 model.push({ | 753 } |
648 property: 'inetSubnetAddress', | 754 } |
649 name: loadTimeData.getString('inetSubnetAddress'), | |
650 value: inetSubnetAddress, | |
651 }); | |
652 model.push({ | |
653 property: 'inetGateway', | |
654 name: loadTimeData.getString('inetGateway'), | |
655 value: inetGateway, | |
656 }); | |
657 model.push({ | |
658 property: 'inetDns', | |
659 name: loadTimeData.getString('inetDns'), | |
660 value: inetDns, | |
661 }); | |
662 ipConfigList.dataModel = model; | |
663 | 755 |
664 $('ip-type-dhcp').addEventListener('click', function(event) { | 756 var configureAddressField = function(field, model) { |
665 // Disable ipConfigList and switch back to dhcp values (if any). | 757 IPAddressField.decorate(field); |
666 if (data.ipconfigDHCP.value) { | 758 field.model = model; |
667 var config = data.ipconfigDHCP.value; | 759 field.editable = model.autoConfig == 'user'; |
668 ipConfigList.dataModel.item(0).value = config.address; | 760 }; |
669 ipConfigList.dataModel.item(1).value = config.subnetAddress; | |
670 ipConfigList.dataModel.item(2).value = config.gateway; | |
671 ipConfigList.dataModel.item(3).value = config.dns; | |
672 } | |
673 ipConfigList.dataModel.updateIndex(0); | |
674 ipConfigList.dataModel.updateIndex(1); | |
675 ipConfigList.dataModel.updateIndex(2); | |
676 ipConfigList.dataModel.updateIndex(3); | |
677 // Unselect all so we don't keep the currently selected field editable. | |
678 ipConfigList.selectionModel.unselectAll(); | |
679 ipConfigList.disabled = true; | |
680 }); | |
681 | 761 |
682 $('ip-type-static').addEventListener('click', function(event) { | 762 configureAddressField($('ip-address'), inetAddress); |
683 // Enable ipConfigList. | 763 configureAddressField($('ip-netmask'), inetNetmask); |
684 ipConfigList.disabled = false; | 764 configureAddressField($('ip-gateway'), inetGateway); |
685 ipConfigList.focus(); | 765 |
686 ipConfigList.selectionModel.selectedIndex = 0; | 766 if (data.ipconfig.value && data.ipconfig.value.nameServers) |
687 }); | 767 $('automatic-dns-display').textContent = data.ipconfig.value.nameServers; |
| 768 |
| 769 if (data.savedIP && data.savedIP.nameServers) |
| 770 $('automatic-dns-display').textContent = data.savedIP.nameServers; |
| 771 |
| 772 if (data.nameServersGoogle) |
| 773 $('google-dns-display').textContent = data.nameServersGoogle; |
| 774 |
| 775 var nameServersUser = []; |
| 776 if (data.staticIP.value.nameServers) |
| 777 nameServersUser = data.staticIP.value.nameServers.split(','); |
| 778 |
| 779 var nameServerModels = []; |
| 780 for (var i = 0; i < 4; ++i) |
| 781 nameServerModels.push({value: nameServersUser[i] || ''}); |
| 782 |
| 783 $(data.nameServerType + '-dns-radio').checked = true; |
| 784 configureAddressField($('ipconfig-dns1'), nameServerModels[0]); |
| 785 configureAddressField($('ipconfig-dns2'), nameServerModels[1]); |
| 786 configureAddressField($('ipconfig-dns3'), nameServerModels[2]); |
| 787 configureAddressField($('ipconfig-dns4'), nameServerModels[3]); |
| 788 |
| 789 DetailsInternetPage.updateNameServerDisplay(data.nameServerType); |
688 | 790 |
689 if (data.hardwareAddress) { | 791 if (data.hardwareAddress) { |
690 $('hardware-address').textContent = data.hardwareAddress; | 792 $('hardware-address').textContent = data.hardwareAddress; |
691 $('hardware-address-row').style.display = 'table-row'; | 793 $('hardware-address-row').style.display = 'table-row'; |
692 } else { | 794 } else { |
693 // This is most likely a device without a hardware address. | 795 // This is most likely a device without a hardware address. |
694 $('hardware-address-row').style.display = 'none'; | 796 $('hardware-address-row').style.display = 'none'; |
695 } | 797 } |
696 if (data.type == Constants.TYPE_WIFI) { | 798 if (data.type == Constants.TYPE_WIFI) { |
697 OptionsPage.showTab($('wifi-network-nav-tab')); | 799 OptionsPage.showTab($('wifi-network-nav-tab')); |
698 detailsPage.wireless = true; | 800 detailsPage.wireless = true; |
699 detailsPage.vpn = false; | 801 detailsPage.vpn = false; |
700 detailsPage.ethernet = false; | 802 detailsPage.ethernet = false; |
701 detailsPage.cellular = false; | 803 detailsPage.cellular = false; |
702 detailsPage.gsm = false; | 804 detailsPage.gsm = false; |
703 detailsPage.wimax = false; | 805 detailsPage.wimax = false; |
704 detailsPage.shared = data.shared; | 806 detailsPage.shared = data.shared; |
705 $('wifi-connection-state').textContent = data.connectionState; | 807 $('wifi-connection-state').textContent = data.connectionState; |
706 $('wifi-ssid').textContent = data.ssid; | 808 $('wifi-ssid').textContent = data.ssid; |
707 if (data.bssid && data.bssid.length > 0) { | 809 if (data.bssid && data.bssid.length > 0) { |
708 $('wifi-bssid').textContent = data.bssid; | 810 $('wifi-bssid').textContent = data.bssid; |
709 $('wifi-bssid-entry').hidden = false; | 811 $('wifi-bssid-entry').hidden = false; |
710 } else { | 812 } else { |
711 $('wifi-bssid-entry').hidden = true; | 813 $('wifi-bssid-entry').hidden = true; |
712 } | 814 } |
713 $('wifi-ip-address').textContent = inetAddress; | 815 $('wifi-ip-address').textContent = inetAddress; |
714 $('wifi-subnet-address').textContent = inetSubnetAddress; | 816 $('wifi-netmask').textContent = inetNetmask; |
715 $('wifi-gateway').textContent = inetGateway; | 817 $('wifi-gateway').textContent = inetGateway; |
716 $('wifi-dns').textContent = inetDns; | 818 $('wifi-name-servers').textContent = inetNameServers; |
717 if (data.encryption && data.encryption.length > 0) { | 819 if (data.encryption && data.encryption.length > 0) { |
718 $('wifi-security').textContent = data.encryption; | 820 $('wifi-security').textContent = data.encryption; |
719 $('wifi-security-entry').hidden = false; | 821 $('wifi-security-entry').hidden = false; |
720 } else { | 822 } else { |
721 $('wifi-security-entry').hidden = true; | 823 $('wifi-security-entry').hidden = true; |
722 } | 824 } |
723 // Frequency is in MHz. | 825 // Frequency is in MHz. |
724 var frequency = loadTimeData.getString('inetFrequencyFormat'); | 826 var frequency = loadTimeData.getString('inetFrequencyFormat'); |
725 frequency = frequency.replace('$1', data.frequency); | 827 frequency = frequency.replace('$1', data.frequency); |
726 $('wifi-frequency').textContent = frequency; | 828 $('wifi-frequency').textContent = frequency; |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 | 1006 |
905 // Don't show page name in address bar and in history to prevent people | 1007 // Don't show page name in address bar and in history to prevent people |
906 // navigate here by hand and solve issue with page session restore. | 1008 // navigate here by hand and solve issue with page session restore. |
907 OptionsPage.showPageByName('detailsInternetPage', false); | 1009 OptionsPage.showPageByName('detailsInternetPage', false); |
908 }; | 1010 }; |
909 | 1011 |
910 return { | 1012 return { |
911 DetailsInternetPage: DetailsInternetPage | 1013 DetailsInternetPage: DetailsInternetPage |
912 }; | 1014 }; |
913 }); | 1015 }); |
OLD | NEW |