Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: chrome/browser/resources/options/browser_options.js

Issue 2220453002: Add a button to open TalkBack settings in chrome://settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 719
720 if (loadTimeData.getBoolean('cloudPrintShowMDnsOptions')) { 720 if (loadTimeData.getBoolean('cloudPrintShowMDnsOptions')) {
721 $('cloudprint-options-mdns').hidden = false; 721 $('cloudprint-options-mdns').hidden = false;
722 $('cloudPrintDevicesPageButton').onclick = function() { 722 $('cloudPrintDevicesPageButton').onclick = function() {
723 chrome.send('showCloudPrintDevicesPage'); 723 chrome.send('showCloudPrintDevicesPage');
724 }; 724 };
725 } 725 }
726 726
727 // Accessibility section (CrOS only). 727 // Accessibility section (CrOS only).
728 if (cr.isChromeOS) { 728 if (cr.isChromeOS) {
729 var updateAccessibilitySettingsButton = function() { 729 var updateAccessibilitySettingsButtons = function() {
stevenjb 2016/08/08 22:41:03 As long as we are changing the name, maybe make it
yhanada 2016/08/09 06:29:40 Done.
730 $('accessibility-settings').hidden = 730 $('accessibility-settings').hidden =
731 !($('accessibility-spoken-feedback-check').checked); 731 !($('accessibility-spoken-feedback-check').checked);
732 }; 732 };
733 Preferences.getInstance().addEventListener( 733 Preferences.getInstance().addEventListener(
734 'settings.accessibility', 734 'settings.accessibility',
735 updateAccessibilitySettingsButton); 735 updateAccessibilitySettingsButtons);
736 $('accessibility-learn-more').onclick = function(unused_event) { 736 $('accessibility-learn-more').onclick = function(unused_event) {
737 chrome.send('coreOptionsUserMetricsAction', 737 chrome.send('coreOptionsUserMetricsAction',
738 ['Options_AccessibilityLearnMore']); 738 ['Options_AccessibilityLearnMore']);
739 }; 739 };
740 $('accessibility-settings-button').onclick = function(unused_event) { 740 $('accessibility-settings-button').onclick = function(unused_event) {
741 window.open(loadTimeData.getString('accessibilitySettingsURL')); 741 window.open(loadTimeData.getString('accessibilitySettingsURL'));
742 }; 742 };
743 $('talkback-settings-button').onclick = function(unused_event) {
744 chrome.send('showAccessibilityTalkBackSettings');
745 };
743 $('accessibility-spoken-feedback-check').onchange = 746 $('accessibility-spoken-feedback-check').onchange =
744 updateAccessibilitySettingsButton; 747 updateAccessibilitySettingsButtons;
745 updateAccessibilitySettingsButton(); 748 updateAccessibilitySettingsButtons();
746 749
747 var updateScreenMagnifierCenterFocus = function() { 750 var updateScreenMagnifierCenterFocus = function() {
748 $('accessibility-screen-magnifier-center-focus-check').disabled = 751 $('accessibility-screen-magnifier-center-focus-check').disabled =
749 !$('accessibility-screen-magnifier-check').checked; 752 !$('accessibility-screen-magnifier-check').checked;
750 }; 753 };
751 Preferences.getInstance().addEventListener( 754 Preferences.getInstance().addEventListener(
752 $('accessibility-screen-magnifier-check').getAttribute('pref'), 755 $('accessibility-screen-magnifier-check').getAttribute('pref'),
753 updateScreenMagnifierCenterFocus); 756 updateScreenMagnifierCenterFocus);
754 757
755 var updateDelayDropdown = function() { 758 var updateDelayDropdown = function() {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 }); 830 });
828 if (button) 831 if (button)
829 chrome.send('disableExtension', [button.dataset.extensionId]); 832 chrome.send('disableExtension', [button.dataset.extensionId]);
830 }); 833 });
831 834
832 // Setup ARC section. 835 // Setup ARC section.
833 if (cr.isChromeOS) { 836 if (cr.isChromeOS) {
834 $('android-apps-settings-label').innerHTML = 837 $('android-apps-settings-label').innerHTML =
835 loadTimeData.getString('androidAppsSettingsLabel'); 838 loadTimeData.getString('androidAppsSettingsLabel');
836 Preferences.getInstance().addEventListener('arc.enabled', function(e) { 839 Preferences.getInstance().addEventListener('arc.enabled', function(e) {
837 var settings = $('android-apps-settings');
838 // Only change settings visibility on committed settings changes. 840 // Only change settings visibility on committed settings changes.
839 if (!settings || e.value.uncommitted) 841 if (e.value.uncommitted)
840 return; 842 return;
841 settings.hidden = !e.value.value; 843
844 var isArcEnabled = !e.value.value;
845 var androidAppSettings = $('android-apps-settings');
846 if (androidAppSettings != null)
847 androidAppSettings.hidden = isArcEnabled;
848
849 var talkbackSettingsButton = $('talkback-settings-button');
850 if (talkbackSettingsButton != null)
851 talkbackSettingsButton.hidden = isArcEnabled;
842 }); 852 });
843 853
844 $('android-apps-settings-link').addEventListener('click', function(e) { 854 $('android-apps-settings-link').addEventListener('click', function(e) {
845 chrome.send('showAndroidAppsSettings'); 855 chrome.send('showAndroidAppsSettings');
846 }); 856 });
847 } 857 }
848 }, 858 },
849 859
850 /** @override */ 860 /** @override */
851 didShowPage: function() { 861 didShowPage: function() {
(...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after
2441 2451
2442 settings.hidden = !isVisible; 2452 settings.hidden = !isVisible;
2443 }; 2453 };
2444 } 2454 }
2445 2455
2446 // Export 2456 // Export
2447 return { 2457 return {
2448 BrowserOptions: BrowserOptions 2458 BrowserOptions: BrowserOptions
2449 }; 2459 };
2450 }); 2460 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698