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 // AdvancedOptions class | 10 // AdvancedOptions class |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 chrome.send('coreOptionsUserMetricsAction', | 101 chrome.send('coreOptionsUserMetricsAction', |
102 ['Options_ShowProxySettings']); | 102 ['Options_ShowProxySettings']); |
103 }; | 103 }; |
104 } | 104 } |
105 | 105 |
106 if (cr.isWindows) { | 106 if (cr.isWindows) { |
107 $('sslCheckRevocation').onclick = function(event) { | 107 $('sslCheckRevocation').onclick = function(event) { |
108 chrome.send('checkRevocationCheckboxAction', | 108 chrome.send('checkRevocationCheckboxAction', |
109 [String($('sslCheckRevocation').checked)]); | 109 [String($('sslCheckRevocation').checked)]); |
110 }; | 110 }; |
111 $('sslUseSSL2').onclick = function(event) { | |
112 chrome.send('useSSL2CheckboxAction', | |
113 [String($('sslUseSSL2').checked)]); | |
114 }; | |
115 $('sslUseSSL3').onclick = function(event) { | 111 $('sslUseSSL3').onclick = function(event) { |
116 chrome.send('useSSL3CheckboxAction', | 112 chrome.send('useSSL3CheckboxAction', |
117 [String($('sslUseSSL3').checked)]); | 113 [String($('sslUseSSL3').checked)]); |
118 }; | 114 }; |
119 $('sslUseTLS1').onclick = function(event) { | 115 $('sslUseTLS1').onclick = function(event) { |
120 chrome.send('useTLS1CheckboxAction', | 116 chrome.send('useTLS1CheckboxAction', |
121 [String($('sslUseTLS1').checked)]); | 117 [String($('sslUseTLS1').checked)]); |
122 }; | 118 }; |
123 $('gearSettingsConfigureGearsButton').onclick = function(event) { | 119 $('gearSettingsConfigureGearsButton').onclick = function(event) { |
124 chrome.send('showGearsSettings'); | 120 chrome.send('showGearsSettings'); |
(...skipping 30 matching lines...) Expand all Loading... |
155 localStrings.getString('optionsRestartRequired'), | 151 localStrings.getString('optionsRestartRequired'), |
156 undefined, '', undefined); | 152 undefined, '', undefined); |
157 } | 153 } |
158 }; | 154 }; |
159 | 155 |
160 // | 156 // |
161 // Chrome callbacks | 157 // Chrome callbacks |
162 // | 158 // |
163 | 159 |
164 // Set the checked state of the metrics reporting checkbox. | 160 // Set the checked state of the metrics reporting checkbox. |
165 AdvancedOptions.SetMetricsReportingCheckboxState = function(checked, | 161 AdvancedOptions.SetMetricsReportingCheckboxState = function( |
166 disabled, user_changed) { | 162 checked, disabled, user_changed) { |
167 $('metricsReportingEnabled').checked = checked; | 163 $('metricsReportingEnabled').checked = checked; |
168 $('metricsReportingEnabled').disabled = disabled; | 164 $('metricsReportingEnabled').disabled = disabled; |
169 | 165 |
170 if (user_changed) | 166 if (user_changed) |
171 AdvancedOptions.getInstance().showRestartRequiredAlert_(); | 167 AdvancedOptions.getInstance().showRestartRequiredAlert_(); |
172 } | 168 } |
173 | 169 |
174 AdvancedOptions.SetMetricsReportingSettingVisibility = function(visible) { | 170 AdvancedOptions.SetMetricsReportingSettingVisibility = function(visible) { |
175 if (visible) { | 171 if (visible) { |
176 $('metricsReportingSetting').style.display = 'block'; | 172 $('metricsReportingSetting').style.display = 'block'; |
(...skipping 25 matching lines...) Expand all Loading... |
202 $('autoOpenFileTypesResetToDefault').disabled = disabled; | 198 $('autoOpenFileTypesResetToDefault').disabled = disabled; |
203 }; | 199 }; |
204 | 200 |
205 // Set the enabled state for the proxy settings button. | 201 // Set the enabled state for the proxy settings button. |
206 AdvancedOptions.SetupProxySettingsSection = function(disabled, label) { | 202 AdvancedOptions.SetupProxySettingsSection = function(disabled, label) { |
207 $('proxiesConfigureButton').disabled = disabled; | 203 $('proxiesConfigureButton').disabled = disabled; |
208 $('proxiesLabel').textContent = label; | 204 $('proxiesLabel').textContent = label; |
209 }; | 205 }; |
210 | 206 |
211 // Set the checked state for the sslCheckRevocation checkbox. | 207 // Set the checked state for the sslCheckRevocation checkbox. |
212 AdvancedOptions.SetCheckRevocationCheckboxState = function(checked, | 208 AdvancedOptions.SetCheckRevocationCheckboxState = function( |
213 disabled) { | 209 checked, disabled) { |
214 $('sslCheckRevocation').checked = checked; | 210 $('sslCheckRevocation').checked = checked; |
215 $('sslCheckRevocation').disabled = disabled; | 211 $('sslCheckRevocation').disabled = disabled; |
216 }; | 212 }; |
217 | 213 |
218 // Set the checked state for the sslUseSSL2 checkbox. | |
219 AdvancedOptions.SetUseSSL2CheckboxState = function(checked, disabled) { | |
220 $('sslUseSSL2').checked = checked; | |
221 $('sslUseSSL2').disabled = disabled; | |
222 }; | |
223 | |
224 // Set the checked state for the sslUseSSL3 checkbox. | 214 // Set the checked state for the sslUseSSL3 checkbox. |
225 AdvancedOptions.SetUseSSL3CheckboxState = function(checked, disabled) { | 215 AdvancedOptions.SetUseSSL3CheckboxState = function(checked, disabled) { |
226 $('sslUseSSL3').checked = checked; | 216 $('sslUseSSL3').checked = checked; |
227 $('sslUseSSL3').disabled = disabled; | 217 $('sslUseSSL3').disabled = disabled; |
228 }; | 218 }; |
229 | 219 |
230 // Set the checked state for the sslUseTLS1 checkbox. | 220 // Set the checked state for the sslUseTLS1 checkbox. |
231 AdvancedOptions.SetUseTLS1CheckboxState = function(checked, disabled) { | 221 AdvancedOptions.SetUseTLS1CheckboxState = function(checked, disabled) { |
232 $('sslUseTLS1').checked = checked; | 222 $('sslUseTLS1').checked = checked; |
233 $('sslUseTLS1').disabled = disabled; | 223 $('sslUseTLS1').disabled = disabled; |
(...skipping 21 matching lines...) Expand all Loading... |
255 $('cloud-print-proxy-section').style.display = 'none'; | 245 $('cloud-print-proxy-section').style.display = 'none'; |
256 } | 246 } |
257 }; | 247 }; |
258 | 248 |
259 // Export | 249 // Export |
260 return { | 250 return { |
261 AdvancedOptions: AdvancedOptions | 251 AdvancedOptions: AdvancedOptions |
262 }; | 252 }; |
263 | 253 |
264 }); | 254 }); |
OLD | NEW |