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.exportPath('options'); | 5 cr.exportPath('options'); |
6 | 6 |
7 /** | 7 /** |
8 * @typedef {{actionLinkText: (string|undefined), | 8 * @typedef {{actionLinkText: (string|undefined), |
9 * childUser: (boolean|undefined), | 9 * childUser: (boolean|undefined), |
10 * hasError: (boolean|undefined), | 10 * hasError: (boolean|undefined), |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 'settings.accessibility', | 635 'settings.accessibility', |
636 updateAccessibilitySettingsButton); | 636 updateAccessibilitySettingsButton); |
637 $('accessibility-learn-more').onclick = function(unused_event) { | 637 $('accessibility-learn-more').onclick = function(unused_event) { |
638 window.open(loadTimeData.getString('accessibilityLearnMoreURL')); | 638 window.open(loadTimeData.getString('accessibilityLearnMoreURL')); |
639 chrome.send('coreOptionsUserMetricsAction', | 639 chrome.send('coreOptionsUserMetricsAction', |
640 ['Options_AccessibilityLearnMore']); | 640 ['Options_AccessibilityLearnMore']); |
641 }; | 641 }; |
642 $('accessibility-settings-button').onclick = function(unused_event) { | 642 $('accessibility-settings-button').onclick = function(unused_event) { |
643 window.open(loadTimeData.getString('accessibilitySettingsURL')); | 643 window.open(loadTimeData.getString('accessibilitySettingsURL')); |
644 }; | 644 }; |
645 $('accessibility-spoken-feedback-check').onchange = function( | 645 $('accessibility-spoken-feedback-check').onchange = |
646 unused_event) { | 646 updateAccessibilitySettingsButton; |
647 chrome.send('spokenFeedbackChange', | |
648 [$('accessibility-spoken-feedback-check').checked]); | |
649 updateAccessibilitySettingsButton(); | |
650 }; | |
651 updateAccessibilitySettingsButton(); | 647 updateAccessibilitySettingsButton(); |
652 | 648 |
653 $('accessibility-high-contrast-check').onchange = function( | |
654 unused_event) { | |
655 chrome.send('highContrastChange', | |
656 [$('accessibility-high-contrast-check').checked]); | |
657 }; | |
658 | |
659 var updateDelayDropdown = function() { | 649 var updateDelayDropdown = function() { |
660 $('accessibility-autoclick-dropdown').disabled = | 650 $('accessibility-autoclick-dropdown').disabled = |
661 !$('accessibility-autoclick-check').checked; | 651 !$('accessibility-autoclick-check').checked; |
662 }; | 652 }; |
663 Preferences.getInstance().addEventListener( | 653 Preferences.getInstance().addEventListener( |
664 $('accessibility-autoclick-check').getAttribute('pref'), | 654 $('accessibility-autoclick-check').getAttribute('pref'), |
665 updateDelayDropdown); | 655 updateDelayDropdown); |
666 } | 656 } |
667 | 657 |
668 // Display management section (CrOS only). | 658 // Display management section (CrOS only). |
(...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2204 } | 2194 } |
2205 button.textContent = loadTimeData.getString(strId); | 2195 button.textContent = loadTimeData.getString(strId); |
2206 }; | 2196 }; |
2207 } | 2197 } |
2208 | 2198 |
2209 // Export | 2199 // Export |
2210 return { | 2200 return { |
2211 BrowserOptions: BrowserOptions | 2201 BrowserOptions: BrowserOptions |
2212 }; | 2202 }; |
2213 }); | 2203 }); |
OLD | NEW |