| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // AdvancedOptions class | 10 // AdvancedOptions class |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 $('promptForDownload').onclick = function(event) { | 91 $('promptForDownload').onclick = function(event) { |
| 92 chrome.send('promptForDownloadAction', | 92 chrome.send('promptForDownloadAction', |
| 93 [String($('promptForDownload').checked)]); | 93 [String($('promptForDownload').checked)]); |
| 94 }; | 94 }; |
| 95 } | 95 } |
| 96 | 96 |
| 97 $('sslCheckRevocation').onclick = function(event) { | 97 $('sslCheckRevocation').onclick = function(event) { |
| 98 chrome.send('checkRevocationCheckboxAction', | 98 chrome.send('checkRevocationCheckboxAction', |
| 99 [String($('sslCheckRevocation').checked)]); | 99 [String($('sslCheckRevocation').checked)]); |
| 100 }; | 100 }; |
| 101 $('sslUseSSL3').onclick = function(event) { | |
| 102 chrome.send('useSSL3CheckboxAction', | |
| 103 [String($('sslUseSSL3').checked)]); | |
| 104 }; | |
| 105 $('sslUseTLS1').onclick = function(event) { | |
| 106 chrome.send('useTLS1CheckboxAction', | |
| 107 [String($('sslUseTLS1').checked)]); | |
| 108 }; | |
| 109 | 101 |
| 110 if ($('backgroundModeCheckbox')) { | 102 if ($('backgroundModeCheckbox')) { |
| 111 $('backgroundModeCheckbox').onclick = function(event) { | 103 $('backgroundModeCheckbox').onclick = function(event) { |
| 112 chrome.send('backgroundModeAction', | 104 chrome.send('backgroundModeAction', |
| 113 [String($('backgroundModeCheckbox').checked)]); | 105 [String($('backgroundModeCheckbox').checked)]); |
| 114 }; | 106 }; |
| 115 } | 107 } |
| 116 | 108 |
| 117 // 'cloudPrintProxyEnabled' is true for Chrome branded builds on | 109 // 'cloudPrintProxyEnabled' is true for Chrome branded builds on |
| 118 // certain platforms, or could be enabled by a lab. | 110 // certain platforms, or could be enabled by a lab. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 } | 211 } |
| 220 }; | 212 }; |
| 221 | 213 |
| 222 // Set the checked state for the sslCheckRevocation checkbox. | 214 // Set the checked state for the sslCheckRevocation checkbox. |
| 223 AdvancedOptions.SetCheckRevocationCheckboxState = function( | 215 AdvancedOptions.SetCheckRevocationCheckboxState = function( |
| 224 checked, disabled) { | 216 checked, disabled) { |
| 225 $('sslCheckRevocation').checked = checked; | 217 $('sslCheckRevocation').checked = checked; |
| 226 $('sslCheckRevocation').disabled = disabled; | 218 $('sslCheckRevocation').disabled = disabled; |
| 227 }; | 219 }; |
| 228 | 220 |
| 229 // Set the checked state for the sslUseSSL3 checkbox. | |
| 230 AdvancedOptions.SetUseSSL3CheckboxState = function(checked, disabled) { | |
| 231 $('sslUseSSL3').checked = checked; | |
| 232 $('sslUseSSL3').disabled = disabled; | |
| 233 }; | |
| 234 | |
| 235 // Set the checked state for the sslUseTLS1 checkbox. | |
| 236 AdvancedOptions.SetUseTLS1CheckboxState = function(checked, disabled) { | |
| 237 $('sslUseTLS1').checked = checked; | |
| 238 $('sslUseTLS1').disabled = disabled; | |
| 239 }; | |
| 240 | |
| 241 // Set the checked state for the backgroundModeCheckbox element. | 221 // Set the checked state for the backgroundModeCheckbox element. |
| 242 AdvancedOptions.SetBackgroundModeCheckboxState = function(checked) { | 222 AdvancedOptions.SetBackgroundModeCheckboxState = function(checked) { |
| 243 $('backgroundModeCheckbox').checked = checked; | 223 $('backgroundModeCheckbox').checked = checked; |
| 244 }; | 224 }; |
| 245 | 225 |
| 246 // Set the Cloud Print proxy UI to enabled, disabled, or processing. | 226 // Set the Cloud Print proxy UI to enabled, disabled, or processing. |
| 247 AdvancedOptions.SetupCloudPrintProxySection = function( | 227 AdvancedOptions.SetupCloudPrintProxySection = function( |
| 248 disabled, label, allowed) { | 228 disabled, label, allowed) { |
| 249 if (!cr.isChromeOS) { | 229 if (!cr.isChromeOS) { |
| 250 $('cloudPrintProxyLabel').textContent = label; | 230 $('cloudPrintProxyLabel').textContent = label; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 268 proxySectionElm.parentNode.removeChild(proxySectionElm); | 248 proxySectionElm.parentNode.removeChild(proxySectionElm); |
| 269 } | 249 } |
| 270 }; | 250 }; |
| 271 | 251 |
| 272 // Export | 252 // Export |
| 273 return { | 253 return { |
| 274 AdvancedOptions: AdvancedOptions | 254 AdvancedOptions: AdvancedOptions |
| 275 }; | 255 }; |
| 276 | 256 |
| 277 }); | 257 }); |
| OLD | NEW |