| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 $('disableWifi').onclick = function(event) { | 57 $('disableWifi').onclick = function(event) { |
| 58 chrome.send('disableWifi', []); | 58 chrome.send('disableWifi', []); |
| 59 }; | 59 }; |
| 60 $('enableCellular').onclick = function(event) { | 60 $('enableCellular').onclick = function(event) { |
| 61 chrome.send('disableCellular', []); | 61 chrome.send('disableCellular', []); |
| 62 }; | 62 }; |
| 63 $('disableCellular').onclick = function(event) { | 63 $('disableCellular').onclick = function(event) { |
| 64 chrome.send('disableCellular', []); | 64 chrome.send('disableCellular', []); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 this.showNetworkDetails_(); |
| 68 }, |
| 69 |
| 70 showNetworkDetails_: function() { |
| 71 var params = parseQueryParams(window.location); |
| 72 var servicePath = params.servicePath; |
| 73 var networkType = params.networkType; |
| 74 if (!servicePath || !servicePath.length || |
| 75 !networkType || !networkType.length) |
| 76 return; |
| 77 chrome.send('buttonClickCallback', |
| 78 [networkType, servicePath, "options"]); |
| 67 } | 79 } |
| 68 }; | 80 }; |
| 69 | 81 |
| 70 InternetOptions.loginFromDetails = function () { | 82 InternetOptions.loginFromDetails = function () { |
| 71 var data = $('inetAddress').data; | 83 var data = $('inetAddress').data; |
| 72 var servicePath = data.servicePath; | 84 var servicePath = data.servicePath; |
| 73 if (data.certinpkcs) { | 85 if (data.certinpkcs) { |
| 74 chrome.send('loginToCertNetwork',[String(servicePath), | 86 chrome.send('loginToCertNetwork',[String(servicePath), |
| 75 String(data.certPath), | 87 String(data.certPath), |
| 76 String(data.ident), | 88 String(data.ident), |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 } | 206 } |
| 195 OptionsPage.showOverlay('detailsInternetPage'); | 207 OptionsPage.showOverlay('detailsInternetPage'); |
| 196 }; | 208 }; |
| 197 | 209 |
| 198 // Export | 210 // Export |
| 199 return { | 211 return { |
| 200 InternetOptions: InternetOptions | 212 InternetOptions: InternetOptions |
| 201 }; | 213 }; |
| 202 | 214 |
| 203 }); | 215 }); |
| OLD | NEW |