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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 [String($('sslCheckRevocation').checked)]); | 106 [String($('sslCheckRevocation').checked)]); |
107 }; | 107 }; |
108 $('sslUseSSL3').onclick = function(event) { | 108 $('sslUseSSL3').onclick = function(event) { |
109 chrome.send('useSSL3CheckboxAction', | 109 chrome.send('useSSL3CheckboxAction', |
110 [String($('sslUseSSL3').checked)]); | 110 [String($('sslUseSSL3').checked)]); |
111 }; | 111 }; |
112 $('sslUseTLS1').onclick = function(event) { | 112 $('sslUseTLS1').onclick = function(event) { |
113 chrome.send('useTLS1CheckboxAction', | 113 chrome.send('useTLS1CheckboxAction', |
114 [String($('sslUseTLS1').checked)]); | 114 [String($('sslUseTLS1').checked)]); |
115 }; | 115 }; |
116 if (!cr.isChromeOS && !cr.isMac) { | |
Evan Stade
2011/05/12 18:36:32
can you make this a check for the existence of bac
Andrew T Wilson (Slow)
2011/05/12 23:34:31
Done.
| |
117 $('backgroundModeCheckbox').onclick = function(event) { | |
118 chrome.send('backgroundModeAction', | |
119 [String($('backgroundModeCheckbox').checked)]); | |
120 }; | |
121 } | |
116 | 122 |
117 // 'cloudPrintProxyEnabled' is true for Chrome branded builds on | 123 // 'cloudPrintProxyEnabled' is true for Chrome branded builds on |
118 // certain platforms, or could be enabled by a lab. | 124 // certain platforms, or could be enabled by a lab. |
119 if (!cr.isChromeOS) { | 125 if (!cr.isChromeOS) { |
120 $('cloudPrintProxySetupButton').onclick = function(event) { | 126 $('cloudPrintProxySetupButton').onclick = function(event) { |
121 if ($('cloudPrintProxyManageButton').style.display == 'none') { | 127 if ($('cloudPrintProxyManageButton').style.display == 'none') { |
122 // Disable the button, set it's text to the intermediate state. | 128 // Disable the button, set it's text to the intermediate state. |
123 $('cloudPrintProxySetupButton').textContent = | 129 $('cloudPrintProxySetupButton').textContent = |
124 localStrings.getString('cloudPrintProxyEnablingButton'); | 130 localStrings.getString('cloudPrintProxyEnablingButton'); |
125 $('cloudPrintProxySetupButton').disabled = true; | 131 $('cloudPrintProxySetupButton').disabled = true; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
229 $('sslUseSSL3').checked = checked; | 235 $('sslUseSSL3').checked = checked; |
230 $('sslUseSSL3').disabled = disabled; | 236 $('sslUseSSL3').disabled = disabled; |
231 }; | 237 }; |
232 | 238 |
233 // Set the checked state for the sslUseTLS1 checkbox. | 239 // Set the checked state for the sslUseTLS1 checkbox. |
234 AdvancedOptions.SetUseTLS1CheckboxState = function(checked, disabled) { | 240 AdvancedOptions.SetUseTLS1CheckboxState = function(checked, disabled) { |
235 $('sslUseTLS1').checked = checked; | 241 $('sslUseTLS1').checked = checked; |
236 $('sslUseTLS1').disabled = disabled; | 242 $('sslUseTLS1').disabled = disabled; |
237 }; | 243 }; |
238 | 244 |
245 // Set the checked state for the backgroundModeCheckbox element. | |
246 AdvancedOptions.SetBackgroundModeCheckboxState = function(checked) { | |
247 $('backgroundModeCheckbox').checked = checked; | |
248 }; | |
249 | |
239 // Set the Cloud Print proxy UI to enabled, disabled, or processing. | 250 // Set the Cloud Print proxy UI to enabled, disabled, or processing. |
240 AdvancedOptions.SetupCloudPrintProxySection = function( | 251 AdvancedOptions.SetupCloudPrintProxySection = function( |
241 disabled, label, allowed) { | 252 disabled, label, allowed) { |
242 if (!cr.isChromeOS) { | 253 if (!cr.isChromeOS) { |
243 $('cloudPrintProxyLabel').textContent = label; | 254 $('cloudPrintProxyLabel').textContent = label; |
244 if (disabled || !allowed) { | 255 if (disabled || !allowed) { |
245 $('cloudPrintProxySetupButton').textContent = | 256 $('cloudPrintProxySetupButton').textContent = |
246 localStrings.getString('cloudPrintProxyDisabledButton'); | 257 localStrings.getString('cloudPrintProxyDisabledButton'); |
247 $('cloudPrintProxyManageButton').style.display = 'none'; | 258 $('cloudPrintProxyManageButton').style.display = 'none'; |
248 } else { | 259 } else { |
(...skipping 12 matching lines...) Expand all Loading... | |
261 proxySectionElm.parentNode.removeChild(proxySectionElm); | 272 proxySectionElm.parentNode.removeChild(proxySectionElm); |
262 } | 273 } |
263 }; | 274 }; |
264 | 275 |
265 // Export | 276 // Export |
266 return { | 277 return { |
267 AdvancedOptions: AdvancedOptions | 278 AdvancedOptions: AdvancedOptions |
268 }; | 279 }; |
269 | 280 |
270 }); | 281 }); |
OLD | NEW |