Commit 6a80d6a3 authored by Anastasia Helfinstein's avatar Anastasia Helfinstein Committed by Commit Bot

[Switch Access] Remove unused code

AX-Relnotes: n/a.
Bug: None
Change-Id: I7f73bb5e16feb511eb780fbabfb2fd335c4a0707
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2377892
Commit-Queue: Anastasia Helfinstein <anastasi@google.com>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803697}
parent b71115a3
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
pref="{{prefs.settings.a11y.caret_highlight}}" pref="{{prefs.settings.a11y.caret_highlight}}"
label="$i18n{caretHighlightLabel}"> label="$i18n{caretHighlightLabel}">
</settings-toggle-button> </settings-toggle-button>
<template is="dom-if" if="[[shouldShowExperimentalSwitchAccess_]]"> <template is="dom-if" if="[[!isKioskModeActive_]]">
<settings-toggle-button <settings-toggle-button
class="hr" class="hr"
pref="{{prefs.settings.a11y.switch_access.enabled}}" pref="{{prefs.settings.a11y.switch_access.enabled}}"
...@@ -171,8 +171,6 @@ ...@@ -171,8 +171,6 @@
role-description="$i18n{subpageArrowRoleDescription}" embedded> role-description="$i18n{subpageArrowRoleDescription}" embedded>
</cr-link-row> </cr-link-row>
</iron-collapse> </iron-collapse>
</template>
<template is="dom-if" if="[[!isKioskModeActive_]]">
<cr-link-row id="keyboardSubpageButton" class="hr" <cr-link-row id="keyboardSubpageButton" class="hr"
label="$i18n{keyboardSettingsTitle}" on-click="onKeyboardTap_" label="$i18n{keyboardSettingsTitle}" on-click="onKeyboardTap_"
sub-label="$i18n{keyboardSettingsDescription}" sub-label="$i18n{keyboardSettingsDescription}"
......
...@@ -144,14 +144,6 @@ Polymer({ ...@@ -144,14 +144,6 @@ Polymer({
}, },
}, },
allowExperimentalSwitchAccess_: {
type: Boolean,
value() {
return loadTimeData.getBoolean(
'showExperimentalAccessibilitySwitchAccess');
},
},
/** @private */ /** @private */
shouldShowExperimentalCursorColor_: { shouldShowExperimentalCursorColor_: {
type: Boolean, type: Boolean,
...@@ -172,14 +164,6 @@ Polymer({ ...@@ -172,14 +164,6 @@ Polymer({
} }
}, },
/** @private */
shouldShowExperimentalSwitchAccess_: {
type: Boolean,
computed: 'computeShouldShowExperimentalSwitchAccess_(' +
'allowExperimentalSwitchAccess_,' +
'isKioskModeActive_)',
},
/** @private */ /** @private */
enableLiveCaption_: { enableLiveCaption_: {
type: Boolean, type: Boolean,
...@@ -502,12 +486,4 @@ Polymer({ ...@@ -502,12 +486,4 @@ Polymer({
shouldShowAdditionalFeaturesLink_(isKiosk, isGuest) { shouldShowAdditionalFeaturesLink_(isKiosk, isGuest) {
return !isKiosk && !isGuest; return !isKiosk && !isGuest;
}, },
/**
* @return {boolean}
* @private
*/
computeShouldShowExperimentalSwitchAccess_() {
return this.allowExperimentalSwitchAccess_ && !this.isKioskModeActive_;
},
}); });
...@@ -69,14 +69,12 @@ ...@@ -69,14 +69,12 @@
</settings-captions> </settings-captions>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" if="[[showExperimentalSwitchAccess_]]"> <template is="dom-if" route-path="/manageAccessibility/switchAccess">
<template is="dom-if" route-path="/manageAccessibility/switchAccess"> <settings-subpage associated-control="[[$$('#subpage-trigger')]]"
<settings-subpage associated-control="[[$$('#subpage-trigger')]]" page-title="$i18n{manageSwitchAccessSettings}">
page-title="$i18n{manageSwitchAccessSettings}"> <settings-switch-access-subpage prefs="{{prefs}}">
<settings-switch-access-subpage prefs="{{prefs}}"> </settings-switch-access-subpage>
</settings-switch-access-subpage> </settings-subpage>
</settings-subpage>
</template>
</template> </template>
</settings-animated-pages> </settings-animated-pages>
</template> </template>
......
...@@ -50,18 +50,6 @@ Polymer({ ...@@ -50,18 +50,6 @@ Polymer({
}, },
}, },
/**
* Whether to show Switch Access.
* @private {boolean}
*/
showExperimentalSwitchAccess_: {
type: Boolean,
value() {
return loadTimeData.getBoolean(
'showExperimentalAccessibilitySwitchAccess');
},
},
/** /**
* Whether the user is in kiosk mode. * Whether the user is in kiosk mode.
* @private * @private
......
...@@ -269,11 +269,9 @@ cr.define('settings', function() { ...@@ -269,11 +269,9 @@ cr.define('settings', function() {
r.MANAGE_TTS_SETTINGS = createSubpage( r.MANAGE_TTS_SETTINGS = createSubpage(
r.MANAGE_ACCESSIBILITY, mojom.TEXT_TO_SPEECH_SUBPAGE_PATH, r.MANAGE_ACCESSIBILITY, mojom.TEXT_TO_SPEECH_SUBPAGE_PATH,
Subpage.kTextToSpeech); Subpage.kTextToSpeech);
if (loadTimeData.getBoolean('showExperimentalAccessibilitySwitchAccess')) { r.MANAGE_SWITCH_ACCESS_SETTINGS = createSubpage(
r.MANAGE_SWITCH_ACCESS_SETTINGS = createSubpage( r.MANAGE_ACCESSIBILITY, mojom.SWITCH_ACCESS_OPTIONS_SUBPAGE_PATH,
r.MANAGE_ACCESSIBILITY, mojom.SWITCH_ACCESS_OPTIONS_SUBPAGE_PATH, Subpage.kSwitchAccessOptions);
Subpage.kSwitchAccessOptions);
}
r.MANAGE_CAPTION_SETTINGS = createSubpage( r.MANAGE_CAPTION_SETTINGS = createSubpage(
r.MANAGE_ACCESSIBILITY, mojom.CAPTIONS_SUBPAGE_PATH, Subpage.kCaptions); r.MANAGE_ACCESSIBILITY, mojom.CAPTIONS_SUBPAGE_PATH, Subpage.kCaptions);
......
...@@ -201,12 +201,6 @@ const std::vector<SearchConcept>& GetA11ySearchConcepts() { ...@@ -201,12 +201,6 @@ const std::vector<SearchConcept>& GetA11ySearchConcepts() {
mojom::SearchResultDefaultRank::kMedium, mojom::SearchResultDefaultRank::kMedium,
mojom::SearchResultType::kSetting, mojom::SearchResultType::kSetting,
{.setting = mojom::Setting::kTextToSpeechVoice}}, {.setting = mojom::Setting::kTextToSpeechVoice}},
});
return *tags;
}
const std::vector<SearchConcept>& GetA11ySwitchAccessSearchConcepts() {
static const base::NoDestructor<std::vector<SearchConcept>> tags({
{IDS_OS_SETTINGS_TAG_A11Y_ENABLE_SWITCH_ACCESS, {IDS_OS_SETTINGS_TAG_A11Y_ENABLE_SWITCH_ACCESS,
mojom::kManageAccessibilitySubpagePath, mojom::kManageAccessibilitySubpagePath,
mojom::SearchResultIcon::kA11y, mojom::SearchResultIcon::kA11y,
...@@ -302,11 +296,6 @@ bool IsCursorColorAllowed() { ...@@ -302,11 +296,6 @@ bool IsCursorColorAllowed() {
return features::IsAccessibilityCursorColorEnabled(); return features::IsAccessibilityCursorColorEnabled();
} }
bool IsSwitchAccessAllowed() {
// TODO(anastasi): Remove this method.
return true;
}
bool IsSwitchAccessTextAllowed() { bool IsSwitchAccessTextAllowed() {
return base::CommandLine::ForCurrentProcess()->HasSwitch( return base::CommandLine::ForCurrentProcess()->HasSwitch(
::switches::kEnableExperimentalAccessibilitySwitchAccessText); ::switches::kEnableExperimentalAccessibilitySwitchAccessText);
...@@ -530,8 +519,6 @@ void AccessibilitySection::AddLoadTimeData( ...@@ -530,8 +519,6 @@ void AccessibilitySection::AddLoadTimeData(
html_source->AddString("a11yLearnMoreUrl", html_source->AddString("a11yLearnMoreUrl",
chrome::kChromeAccessibilityHelpURL); chrome::kChromeAccessibilityHelpURL);
html_source->AddBoolean("showExperimentalAccessibilitySwitchAccess",
IsSwitchAccessAllowed());
html_source->AddBoolean( html_source->AddBoolean(
"showExperimentalAccessibilitySwitchAccessImprovedTextInput", "showExperimentalAccessibilitySwitchAccessImprovedTextInput",
IsSwitchAccessTextAllowed()); IsSwitchAccessTextAllowed());
...@@ -658,7 +645,6 @@ void AccessibilitySection::UpdateSearchTags() { ...@@ -658,7 +645,6 @@ void AccessibilitySection::UpdateSearchTags() {
updater.RemoveSearchTags(GetA11yLabelsSearchConcepts()); updater.RemoveSearchTags(GetA11yLabelsSearchConcepts());
} }
updater.RemoveSearchTags(GetA11ySwitchAccessSearchConcepts());
updater.RemoveSearchTags(GetA11ySwitchAccessOnSearchConcepts()); updater.RemoveSearchTags(GetA11ySwitchAccessOnSearchConcepts());
updater.RemoveSearchTags(GetA11ySwitchAccessKeyboardSearchConcepts()); updater.RemoveSearchTags(GetA11ySwitchAccessKeyboardSearchConcepts());
...@@ -674,11 +660,6 @@ void AccessibilitySection::UpdateSearchTags() { ...@@ -674,11 +660,6 @@ void AccessibilitySection::UpdateSearchTags() {
updater.RemoveSearchTags(GetA11yCursorColorSearchConcepts()); updater.RemoveSearchTags(GetA11yCursorColorSearchConcepts());
} }
if (!IsSwitchAccessAllowed())
return;
updater.AddSearchTags(GetA11ySwitchAccessSearchConcepts());
if (!pref_service_->GetBoolean( if (!pref_service_->GetBoolean(
ash::prefs::kAccessibilitySwitchAccessEnabled)) { ash::prefs::kAccessibilitySwitchAccessEnabled)) {
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment