| 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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 chrome.send('spokenFeedbackChange', | 475 chrome.send('spokenFeedbackChange', |
| 476 [$('accessibility-spoken-feedback-check').checked]); | 476 [$('accessibility-spoken-feedback-check').checked]); |
| 477 }; | 477 }; |
| 478 | 478 |
| 479 $('accessibility-high-contrast-check').onchange = function(event) { | 479 $('accessibility-high-contrast-check').onchange = function(event) { |
| 480 chrome.send('highContrastChange', | 480 chrome.send('highContrastChange', |
| 481 [$('accessibility-high-contrast-check').checked]); | 481 [$('accessibility-high-contrast-check').checked]); |
| 482 }; | 482 }; |
| 483 } | 483 } |
| 484 | 484 |
| 485 // Display management section (CrOS only). |
| 486 if (cr.isChromeOS) { |
| 487 $('displayOptionsButton').onclick = function(event) { |
| 488 OptionsPage.navigateToPage('display'); |
| 489 chrome.send('coreOptionsUserMetricsAction', |
| 490 ['Options_Display']); |
| 491 } |
| 492 } |
| 493 |
| 485 // Background mode section. | 494 // Background mode section. |
| 486 if ($('backgroundModeCheckbox')) { | 495 if ($('backgroundModeCheckbox')) { |
| 487 cr.defineProperty($('backgroundModeCheckbox'), | 496 cr.defineProperty($('backgroundModeCheckbox'), |
| 488 'controlledBy', | 497 'controlledBy', |
| 489 cr.PropertyKind.ATTR); | 498 cr.PropertyKind.ATTR); |
| 490 $('backgroundModeCheckbox').onclick = function(event) { | 499 $('backgroundModeCheckbox').onclick = function(event) { |
| 491 chrome.send('backgroundModeAction', | 500 chrome.send('backgroundModeAction', |
| 492 [String($('backgroundModeCheckbox').checked)]); | 501 [String($('backgroundModeCheckbox').checked)]); |
| 493 }; | 502 }; |
| 494 } | 503 } |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1251 | 1260 |
| 1252 /** | 1261 /** |
| 1253 * Show/hide touchpad settings slider. | 1262 * Show/hide touchpad settings slider. |
| 1254 * @private | 1263 * @private |
| 1255 */ | 1264 */ |
| 1256 showTouchpadControls_: function(show) { | 1265 showTouchpadControls_: function(show) { |
| 1257 $('touchpad-settings').hidden = !show; | 1266 $('touchpad-settings').hidden = !show; |
| 1258 }, | 1267 }, |
| 1259 | 1268 |
| 1260 /** | 1269 /** |
| 1270 * Activate the display options button on the System settings page. |
| 1271 * @private |
| 1272 */ |
| 1273 showDisplayOptions_: function() { |
| 1274 $('display-options-section').hidden = false; |
| 1275 }, |
| 1276 |
| 1277 /** |
| 1278 * Deactivate the display options button on the System settings page. |
| 1279 * @private |
| 1280 */ |
| 1281 hideDisplayOptions_: function() { |
| 1282 $('display-options-section').hidden = true; |
| 1283 }, |
| 1284 |
| 1285 /** |
| 1261 * Activate the bluetooth settings section on the System settings page. | 1286 * Activate the bluetooth settings section on the System settings page. |
| 1262 * @private | 1287 * @private |
| 1263 */ | 1288 */ |
| 1264 showBluetoothSettings_: function() { | 1289 showBluetoothSettings_: function() { |
| 1265 $('bluetooth-devices').hidden = false; | 1290 $('bluetooth-devices').hidden = false; |
| 1266 }, | 1291 }, |
| 1267 | 1292 |
| 1268 /** | 1293 /** |
| 1269 * Dectivates the bluetooth settings section from the System settings page. | 1294 * Dectivates the bluetooth settings section from the System settings page. |
| 1270 * @private | 1295 * @private |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1350 this.sessionOnlyCookies_ = dict['cookies']['value'] == 'session'; | 1375 this.sessionOnlyCookies_ = dict['cookies']['value'] == 'session'; |
| 1351 } | 1376 } |
| 1352 | 1377 |
| 1353 }; | 1378 }; |
| 1354 | 1379 |
| 1355 //Forward public APIs to private implementations. | 1380 //Forward public APIs to private implementations. |
| 1356 [ | 1381 [ |
| 1357 'addBluetoothDevice', | 1382 'addBluetoothDevice', |
| 1358 'getStartStopSyncButton', | 1383 'getStartStopSyncButton', |
| 1359 'hideBluetoothSettings', | 1384 'hideBluetoothSettings', |
| 1385 'hideDisplayOptions', |
| 1360 'removeCloudPrintConnectorSection', | 1386 'removeCloudPrintConnectorSection', |
| 1361 'removeBluetoothDevice', | 1387 'removeBluetoothDevice', |
| 1362 'setAutoOpenFileTypesDisplayed', | 1388 'setAutoOpenFileTypesDisplayed', |
| 1363 'setBackgroundModeCheckboxState', | 1389 'setBackgroundModeCheckboxState', |
| 1364 'setBluetoothState', | 1390 'setBluetoothState', |
| 1365 'setCheckRevocationCheckboxState', | 1391 'setCheckRevocationCheckboxState', |
| 1366 'setContentFilterSettingsValue', | 1392 'setContentFilterSettingsValue', |
| 1367 'setFontSize', | 1393 'setFontSize', |
| 1368 'setGtkThemeButtonEnabled', | 1394 'setGtkThemeButtonEnabled', |
| 1369 'setHighContrastCheckboxState', | 1395 'setHighContrastCheckboxState', |
| 1370 'setMetricsReportingCheckboxState', | 1396 'setMetricsReportingCheckboxState', |
| 1371 'setMetricsReportingSettingVisibility', | 1397 'setMetricsReportingSettingVisibility', |
| 1372 'setPasswordGenerationSettingVisibility', | 1398 'setPasswordGenerationSettingVisibility', |
| 1373 'setProfilesInfo', | 1399 'setProfilesInfo', |
| 1374 'setScreenMagnifierCheckboxState', | 1400 'setScreenMagnifierCheckboxState', |
| 1375 'setSpokenFeedbackCheckboxState', | 1401 'setSpokenFeedbackCheckboxState', |
| 1376 'setThemesResetButtonEnabled', | 1402 'setThemesResetButtonEnabled', |
| 1377 'setupCloudPrintConnectorSection', | 1403 'setupCloudPrintConnectorSection', |
| 1378 'setupPageZoomSelector', | 1404 'setupPageZoomSelector', |
| 1379 'setupProxySettingsSection', | 1405 'setupProxySettingsSection', |
| 1380 'setVirtualKeyboardCheckboxState', | 1406 'setVirtualKeyboardCheckboxState', |
| 1381 'showBluetoothSettings', | 1407 'showBluetoothSettings', |
| 1408 'showDisplayOptions', |
| 1382 'showMouseControls', | 1409 'showMouseControls', |
| 1383 'showTouchpadControls', | 1410 'showTouchpadControls', |
| 1384 'updateAccountPicture', | 1411 'updateAccountPicture', |
| 1385 'updateAutoLaunchState', | 1412 'updateAutoLaunchState', |
| 1386 'updateDefaultBrowserState', | 1413 'updateDefaultBrowserState', |
| 1387 'updateManagedBannerVisibility', | 1414 'updateManagedBannerVisibility', |
| 1388 'updateSearchEngines', | 1415 'updateSearchEngines', |
| 1389 'updateSyncState', | 1416 'updateSyncState', |
| 1390 'updateStartupPages', | 1417 'updateStartupPages', |
| 1391 ].forEach(function(name) { | 1418 ].forEach(function(name) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1404 BrowserOptions.getLoggedInUsername = function() { | 1431 BrowserOptions.getLoggedInUsername = function() { |
| 1405 return BrowserOptions.getInstance().username_; | 1432 return BrowserOptions.getInstance().username_; |
| 1406 }; | 1433 }; |
| 1407 } | 1434 } |
| 1408 | 1435 |
| 1409 // Export | 1436 // Export |
| 1410 return { | 1437 return { |
| 1411 BrowserOptions: BrowserOptions | 1438 BrowserOptions: BrowserOptions |
| 1412 }; | 1439 }; |
| 1413 }); | 1440 }); |
| OLD | NEW |