| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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', function() { | 5 cr.define('options', function() { |
| 6 | 6 |
| 7 var OptionsPage = options.OptionsPage; | 7 var OptionsPage = options.OptionsPage; |
| 8 | 8 |
| 9 ///////////////////////////////////////////////////////////////////////////// | 9 ///////////////////////////////////////////////////////////////////////////// |
| 10 // InternetOptions class: | 10 // InternetOptions class: |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 String($('inetCertPass').value)]); | 109 String($('inetCertPass').value)]); |
| 110 } | 110 } |
| 111 OptionsPage.clearOverlays(); | 111 OptionsPage.clearOverlays(); |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 InternetOptions.setDetails = function() { | 114 InternetOptions.setDetails = function() { |
| 115 var data = $('inetAddress').data; | 115 var data = $('inetAddress').data; |
| 116 if (data.type == 2) { | 116 if (data.type == 2) { |
| 117 var newinfo = []; | 117 var newinfo = []; |
| 118 newinfo.push(data.servicePath); | 118 newinfo.push(data.servicePath); |
| 119 newinfo.push($('rememberNetwork').checked ? "true" : "false"); | 119 newinfo.push($('autoConnectNetwork').checked ? "true" : "false"); |
| 120 if (data.encrypted && data.certNeeded) { | 120 if (data.encrypted && data.certNeeded) { |
| 121 newinfo.push($('inetIdent').value); | 121 newinfo.push($('inetIdent').value); |
| 122 newinfo.push($('inetCert').value); | 122 newinfo.push($('inetCert').value); |
| 123 newinfo.push($('inetCertPass').value); | 123 newinfo.push($('inetCertPass').value); |
| 124 } | 124 } |
| 125 chrome.send('setDetails', newinfo); | 125 chrome.send('setDetails', newinfo); |
| 126 } | 126 } |
| 127 OptionsPage.clearOverlays(); | 127 OptionsPage.clearOverlays(); |
| 128 }; | 128 }; |
| 129 | 129 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 // This is most likely a device without a hardware address. | 251 // This is most likely a device without a hardware address. |
| 252 $('hardwareAddressRow').style.display = 'none'; | 252 $('hardwareAddressRow').style.display = 'none'; |
| 253 } | 253 } |
| 254 if (data.type == 2) { | 254 if (data.type == 2) { |
| 255 OptionsPage.showTab($('wifiNetworkNavTab')); | 255 OptionsPage.showTab($('wifiNetworkNavTab')); |
| 256 page.setAttribute('wireless', true); | 256 page.setAttribute('wireless', true); |
| 257 page.removeAttribute('ethernet'); | 257 page.removeAttribute('ethernet'); |
| 258 page.removeAttribute('cellular'); | 258 page.removeAttribute('cellular'); |
| 259 page.removeAttribute('gsm'); | 259 page.removeAttribute('gsm'); |
| 260 $('inetSsid').textContent = data.ssid; | 260 $('inetSsid').textContent = data.ssid; |
| 261 $('rememberNetwork').checked = data.autoConnect; | 261 $('autoConnectNetwork').checked = data.autoConnect; |
| 262 if (!AccountsOptions.currentUserIsOwner()) { | 262 if (!AccountsOptions.currentUserIsOwner()) { |
| 263 // Disable this for guest non-Owners. | 263 // Disable this for guest non-Owners. |
| 264 $('rememberNetwork').disabled = true; | 264 $('autoConnectNetwork').disabled = true; |
| 265 } | 265 } |
| 266 page.removeAttribute('password'); | 266 page.removeAttribute('password'); |
| 267 page.removeAttribute('cert'); | 267 page.removeAttribute('cert'); |
| 268 page.removeAttribute('certPkcs'); | 268 page.removeAttribute('certPkcs'); |
| 269 if (data.encrypted) { | 269 if (data.encrypted) { |
| 270 if (data.certNeeded) { | 270 if (data.certNeeded) { |
| 271 if (data.certInPkcs) { | 271 if (data.certInPkcs) { |
| 272 page.setAttribute('certPkcs', true); | 272 page.setAttribute('certPkcs', true); |
| 273 $('inetIdentPkcs').value = data.ident; | 273 $('inetIdentPkcs').value = data.ident; |
| 274 } else { | 274 } else { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 } | 327 } |
| 328 OptionsPage.showOverlay('detailsInternetPage'); | 328 OptionsPage.showOverlay('detailsInternetPage'); |
| 329 }; | 329 }; |
| 330 | 330 |
| 331 // Export | 331 // Export |
| 332 return { | 332 return { |
| 333 InternetOptions: InternetOptions | 333 InternetOptions: InternetOptions |
| 334 }; | 334 }; |
| 335 | 335 |
| 336 }); | 336 }); |
| OLD | NEW |