| 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 $('password-generation-checkbox').style.display = 'block'; |
| 1050 else |
| 1051 $('password-generation-checkbox').style.display = 'none'; |
| 1052 }, |
| 1053 |
| 1054 /** |
| 1044 * Set the font size selected item. | 1055 * Set the font size selected item. |
| 1045 * @private | 1056 * @private |
| 1046 */ | 1057 */ |
| 1047 setFontSize_: function(font_size_value) { | 1058 setFontSize_: function(font_size_value) { |
| 1048 var selectCtl = $('defaultFontSize'); | 1059 var selectCtl = $('defaultFontSize'); |
| 1049 for (var i = 0; i < selectCtl.options.length; i++) { | 1060 for (var i = 0; i < selectCtl.options.length; i++) { |
| 1050 if (selectCtl.options[i].value == font_size_value) { | 1061 if (selectCtl.options[i].value == font_size_value) { |
| 1051 selectCtl.selectedIndex = i; | 1062 selectCtl.selectedIndex = i; |
| 1052 if ($('Custom')) | 1063 if ($('Custom')) |
| 1053 selectCtl.remove($('Custom').index); | 1064 selectCtl.remove($('Custom').index); |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1363 'setBackgroundModeCheckboxState', | 1374 'setBackgroundModeCheckboxState', |
| 1364 'setBluetoothState', | 1375 'setBluetoothState', |
| 1365 'setCheckRevocationCheckboxState', | 1376 'setCheckRevocationCheckboxState', |
| 1366 'setContentFilterSettingsValue', | 1377 'setContentFilterSettingsValue', |
| 1367 'setFontSize', | 1378 'setFontSize', |
| 1368 'setGtkThemeButtonEnabled', | 1379 'setGtkThemeButtonEnabled', |
| 1369 'setHighContrastCheckboxState', | 1380 'setHighContrastCheckboxState', |
| 1370 'setInstantFieldTrialStatus', | 1381 'setInstantFieldTrialStatus', |
| 1371 'setMetricsReportingCheckboxState', | 1382 'setMetricsReportingCheckboxState', |
| 1372 'setMetricsReportingSettingVisibility', | 1383 'setMetricsReportingSettingVisibility', |
| 1384 'setPasswordGenerationSettingVisibility', |
| 1373 'setProfilesInfo', | 1385 'setProfilesInfo', |
| 1374 'setScreenMagnifierCheckboxState', | 1386 'setScreenMagnifierCheckboxState', |
| 1375 'setSpokenFeedbackCheckboxState', | 1387 'setSpokenFeedbackCheckboxState', |
| 1376 'setThemesResetButtonEnabled', | 1388 'setThemesResetButtonEnabled', |
| 1377 'setupCloudPrintConnectorSection', | 1389 'setupCloudPrintConnectorSection', |
| 1378 'setupPageZoomSelector', | 1390 'setupPageZoomSelector', |
| 1379 'setupProxySettingsSection', | 1391 'setupProxySettingsSection', |
| 1380 'setVirtualKeyboardCheckboxState', | 1392 'setVirtualKeyboardCheckboxState', |
| 1381 'showBluetoothSettings', | 1393 'showBluetoothSettings', |
| 1382 'showMouseControls', | 1394 'showMouseControls', |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1404 BrowserOptions.getLoggedInUsername = function() { | 1416 BrowserOptions.getLoggedInUsername = function() { |
| 1405 return BrowserOptions.getInstance().username_; | 1417 return BrowserOptions.getInstance().username_; |
| 1406 }; | 1418 }; |
| 1407 } | 1419 } |
| 1408 | 1420 |
| 1409 // Export | 1421 // Export |
| 1410 return { | 1422 return { |
| 1411 BrowserOptions: BrowserOptions | 1423 BrowserOptions: BrowserOptions |
| 1412 }; | 1424 }; |
| 1413 }); | 1425 }); |
| OLD | NEW |