Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
| 7 var ArrayDataModel = cr.ui.ArrayDataModel; | 7 var ArrayDataModel = cr.ui.ArrayDataModel; |
| 8 var RepeatingButton = cr.ui.RepeatingButton; | 8 var RepeatingButton = cr.ui.RepeatingButton; |
| 9 | 9 |
| 10 // | 10 // |
| (...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1034 * @private | 1034 * @private |
| 1035 */ | 1035 */ |
| 1036 setMetricsReportingSettingVisibility_: function(visible) { | 1036 setMetricsReportingSettingVisibility_: function(visible) { |
| 1037 if (visible) | 1037 if (visible) |
| 1038 $('metricsReportingSetting').style.display = 'block'; | 1038 $('metricsReportingSetting').style.display = 'block'; |
| 1039 else | 1039 else |
| 1040 $('metricsReportingSetting').style.display = 'none'; | 1040 $('metricsReportingSetting').style.display = 'none'; |
| 1041 }, | 1041 }, |
| 1042 | 1042 |
| 1043 /** | 1043 /** |
| 1044 * Set the visibility of the password generation checkbox. | |
| 1045 * @private | |
| 1046 */ | |
| 1047 setPasswordGenerationSettingVisibility_: function(visible) { | |
| 1048 if (visible) { | |
| 1049 $('passwordGenerationCheckbox').style.display = 'block'; | |
| 1050 } else { | |
| 1051 $('passwordGenerationCheckbox').style.display = 'none'; | |
| 1052 } | |
|
Ilya Sherman
2012/05/04 06:04:50
nit: No need for curly braces for single-line stmt
zysxqn
2012/05/04 18:52:54
Done.
| |
| 1053 }, | |
| 1054 | |
| 1055 /** | |
| 1044 * Set the font size selected item. | 1056 * Set the font size selected item. |
| 1045 * @private | 1057 * @private |
| 1046 */ | 1058 */ |
| 1047 setFontSize_: function(font_size_value) { | 1059 setFontSize_: function(font_size_value) { |
| 1048 var selectCtl = $('defaultFontSize'); | 1060 var selectCtl = $('defaultFontSize'); |
| 1049 for (var i = 0; i < selectCtl.options.length; i++) { | 1061 for (var i = 0; i < selectCtl.options.length; i++) { |
| 1050 if (selectCtl.options[i].value == font_size_value) { | 1062 if (selectCtl.options[i].value == font_size_value) { |
| 1051 selectCtl.selectedIndex = i; | 1063 selectCtl.selectedIndex = i; |
| 1052 if ($('Custom')) | 1064 if ($('Custom')) |
| 1053 selectCtl.remove($('Custom').index); | 1065 selectCtl.remove($('Custom').index); |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1363 'setBackgroundModeCheckboxState', | 1375 'setBackgroundModeCheckboxState', |
| 1364 'setBluetoothState', | 1376 'setBluetoothState', |
| 1365 'setCheckRevocationCheckboxState', | 1377 'setCheckRevocationCheckboxState', |
| 1366 'setContentFilterSettingsValue', | 1378 'setContentFilterSettingsValue', |
| 1367 'setFontSize', | 1379 'setFontSize', |
| 1368 'setGtkThemeButtonEnabled', | 1380 'setGtkThemeButtonEnabled', |
| 1369 'setHighContrastCheckboxState', | 1381 'setHighContrastCheckboxState', |
| 1370 'setInstantFieldTrialStatus', | 1382 'setInstantFieldTrialStatus', |
| 1371 'setMetricsReportingCheckboxState', | 1383 'setMetricsReportingCheckboxState', |
| 1372 'setMetricsReportingSettingVisibility', | 1384 'setMetricsReportingSettingVisibility', |
| 1385 'setPasswordGenerationSettingVisibility', | |
| 1373 'setProfilesInfo', | 1386 'setProfilesInfo', |
| 1374 'setScreenMagnifierCheckboxState', | 1387 'setScreenMagnifierCheckboxState', |
| 1375 'setSpokenFeedbackCheckboxState', | 1388 'setSpokenFeedbackCheckboxState', |
| 1376 'setThemesResetButtonEnabled', | 1389 'setThemesResetButtonEnabled', |
| 1377 'setupCloudPrintConnectorSection', | 1390 'setupCloudPrintConnectorSection', |
| 1378 'setupPageZoomSelector', | 1391 'setupPageZoomSelector', |
| 1379 'setupProxySettingsSection', | 1392 'setupProxySettingsSection', |
| 1380 'setVirtualKeyboardCheckboxState', | 1393 'setVirtualKeyboardCheckboxState', |
| 1381 'showBluetoothSettings', | 1394 'showBluetoothSettings', |
| 1382 'showMouseControls', | 1395 'showMouseControls', |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 1404 BrowserOptions.getLoggedInUsername = function() { | 1417 BrowserOptions.getLoggedInUsername = function() { |
| 1405 return BrowserOptions.getInstance().username_; | 1418 return BrowserOptions.getInstance().username_; |
| 1406 }; | 1419 }; |
| 1407 } | 1420 } |
| 1408 | 1421 |
| 1409 // Export | 1422 // Export |
| 1410 return { | 1423 return { |
| 1411 BrowserOptions: BrowserOptions | 1424 BrowserOptions: BrowserOptions |
| 1412 }; | 1425 }; |
| 1413 }); | 1426 }); |
| OLD | NEW |