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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 if (loadTimeData.getBoolean('cloudPrintShowMDnsOptions')) { | 417 if (loadTimeData.getBoolean('cloudPrintShowMDnsOptions')) { |
418 $('cloudprint-options-mdns').hidden = false; | 418 $('cloudprint-options-mdns').hidden = false; |
419 $('cloudprint-options-nomdns').hidden = true; | 419 $('cloudprint-options-nomdns').hidden = true; |
420 $('cloudPrintDevicesPageButton').onclick = function() { | 420 $('cloudPrintDevicesPageButton').onclick = function() { |
421 chrome.send('showCloudPrintDevicesPage'); | 421 chrome.send('showCloudPrintDevicesPage'); |
422 }; | 422 }; |
423 } | 423 } |
424 | 424 |
425 // Accessibility section (CrOS only). | 425 // Accessibility section (CrOS only). |
426 if (cr.isChromeOS) { | 426 if (cr.isChromeOS) { |
| 427 var updateAccessibilitySettingsButton = function() { |
| 428 $('accessibility-settings').hidden = |
| 429 !($('accessibility-spoken-feedback-check').checked); |
| 430 }; |
| 431 Preferences.getInstance().addEventListener( |
| 432 'settings.accessibility', |
| 433 updateAccessibilitySettingsButton); |
| 434 $('accessibility-settings-button').onclick = function(event) { |
| 435 window.open(loadTimeData.getString('accessibilitySettingsURL')); |
| 436 }; |
427 $('accessibility-spoken-feedback-check').onchange = function(event) { | 437 $('accessibility-spoken-feedback-check').onchange = function(event) { |
428 chrome.send('spokenFeedbackChange', | 438 chrome.send('spokenFeedbackChange', |
429 [$('accessibility-spoken-feedback-check').checked]); | 439 [$('accessibility-spoken-feedback-check').checked]); |
| 440 updateAccessibilitySettingsButton(); |
430 }; | 441 }; |
| 442 updateAccessibilitySettingsButton(); |
431 | 443 |
432 $('accessibility-high-contrast-check').onchange = function(event) { | 444 $('accessibility-high-contrast-check').onchange = function(event) { |
433 chrome.send('highContrastChange', | 445 chrome.send('highContrastChange', |
434 [$('accessibility-high-contrast-check').checked]); | 446 [$('accessibility-high-contrast-check').checked]); |
435 }; | 447 }; |
436 | 448 |
437 var updateDelayDropdown = function() { | 449 var updateDelayDropdown = function() { |
438 $('accessibility-autoclick-dropdown').disabled = | 450 $('accessibility-autoclick-dropdown').disabled = |
439 !$('accessibility-autoclick-check').checked; | 451 !$('accessibility-autoclick-check').checked; |
440 }; | 452 }; |
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1600 BrowserOptions.getLoggedInUsername = function() { | 1612 BrowserOptions.getLoggedInUsername = function() { |
1601 return BrowserOptions.getInstance().username_; | 1613 return BrowserOptions.getInstance().username_; |
1602 }; | 1614 }; |
1603 } | 1615 } |
1604 | 1616 |
1605 // Export | 1617 // Export |
1606 return { | 1618 return { |
1607 BrowserOptions: BrowserOptions | 1619 BrowserOptions: BrowserOptions |
1608 }; | 1620 }; |
1609 }); | 1621 }); |
OLD | NEW |