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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 }; | 87 }; |
88 $('downloadLocationChangeButton').onclick = function(event) { | 88 $('downloadLocationChangeButton').onclick = function(event) { |
89 chrome.send('selectDownloadLocation'); | 89 chrome.send('selectDownloadLocation'); |
90 }; | 90 }; |
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) { | |
98 chrome.send('checkRevocationCheckboxAction', | |
99 [String($('sslCheckRevocation').checked)]); | |
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 if ($('backgroundModeCheckbox')) { | 97 if ($('backgroundModeCheckbox')) { |
110 $('backgroundModeCheckbox').onclick = function(event) { | 98 $('backgroundModeCheckbox').onclick = function(event) { |
111 chrome.send('backgroundModeAction', | 99 chrome.send('backgroundModeAction', |
112 [String($('backgroundModeCheckbox').checked)]); | 100 [String($('backgroundModeCheckbox').checked)]); |
113 }; | 101 }; |
114 } | 102 } |
115 | 103 |
116 // 'cloudPrintProxyEnabled' is true for Chrome branded builds on | 104 // 'cloudPrintProxyEnabled' is true for Chrome branded builds on |
117 // certain platforms, or could be enabled by a lab. | 105 // certain platforms, or could be enabled by a lab. |
118 if (!cr.isChromeOS) { | 106 if (!cr.isChromeOS) { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 }; | 199 }; |
212 | 200 |
213 // Set the enabled state for the proxy settings button. | 201 // Set the enabled state for the proxy settings button. |
214 AdvancedOptions.SetupProxySettingsSection = function(disabled, label) { | 202 AdvancedOptions.SetupProxySettingsSection = function(disabled, label) { |
215 if (!cr.isChromeOS) { | 203 if (!cr.isChromeOS) { |
216 $('proxiesConfigureButton').disabled = disabled; | 204 $('proxiesConfigureButton').disabled = disabled; |
217 $('proxiesLabel').textContent = label; | 205 $('proxiesLabel').textContent = label; |
218 } | 206 } |
219 }; | 207 }; |
220 | 208 |
221 // Set the checked state for the sslCheckRevocation checkbox. | |
222 AdvancedOptions.SetCheckRevocationCheckboxState = function( | |
223 checked, disabled) { | |
224 $('sslCheckRevocation').checked = checked; | |
225 $('sslCheckRevocation').disabled = disabled; | |
226 }; | |
227 | |
228 // Set the checked state for the sslUseSSL3 checkbox. | |
229 AdvancedOptions.SetUseSSL3CheckboxState = function(checked, disabled) { | |
230 $('sslUseSSL3').checked = checked; | |
231 $('sslUseSSL3').disabled = disabled; | |
232 }; | |
233 | |
234 // Set the checked state for the sslUseTLS1 checkbox. | |
235 AdvancedOptions.SetUseTLS1CheckboxState = function(checked, disabled) { | |
236 $('sslUseTLS1').checked = checked; | |
237 $('sslUseTLS1').disabled = disabled; | |
238 }; | |
239 | |
240 // Set the checked state for the backgroundModeCheckbox element. | 209 // Set the checked state for the backgroundModeCheckbox element. |
241 AdvancedOptions.SetBackgroundModeCheckboxState = function(checked) { | 210 AdvancedOptions.SetBackgroundModeCheckboxState = function(checked) { |
242 $('backgroundModeCheckbox').checked = checked; | 211 $('backgroundModeCheckbox').checked = checked; |
243 }; | 212 }; |
244 | 213 |
245 // Set the Cloud Print proxy UI to enabled, disabled, or processing. | 214 // Set the Cloud Print proxy UI to enabled, disabled, or processing. |
246 AdvancedOptions.SetupCloudPrintProxySection = function( | 215 AdvancedOptions.SetupCloudPrintProxySection = function( |
247 disabled, label, allowed) { | 216 disabled, label, allowed) { |
248 if (!cr.isChromeOS) { | 217 if (!cr.isChromeOS) { |
249 $('cloudPrintProxyLabel').textContent = label; | 218 $('cloudPrintProxyLabel').textContent = label; |
(...skipping 17 matching lines...) Expand all Loading... |
267 proxySectionElm.parentNode.removeChild(proxySectionElm); | 236 proxySectionElm.parentNode.removeChild(proxySectionElm); |
268 } | 237 } |
269 }; | 238 }; |
270 | 239 |
271 // Export | 240 // Export |
272 return { | 241 return { |
273 AdvancedOptions: AdvancedOptions | 242 AdvancedOptions: AdvancedOptions |
274 }; | 243 }; |
275 | 244 |
276 }); | 245 }); |
OLD | NEW |