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 @@
pref="{{prefs.settings.a11y.caret_highlight}}"
label="$i18n{caretHighlightLabel}">
</settings-toggle-button>
<template is="dom-if" if="[[shouldShowExperimentalSwitchAccess_]]">
<template is="dom-if" if="[[!isKioskModeActive_]]">
<settings-toggle-button
class="hr"
pref="{{prefs.settings.a11y.switch_access.enabled}}"
......@@ -171,8 +171,6 @@
role-description="$i18n{subpageArrowRoleDescription}" embedded>
</cr-link-row>
</iron-collapse>
</template>
<template is="dom-if" if="[[!isKioskModeActive_]]">
<cr-link-row id="keyboardSubpageButton" class="hr"
label="$i18n{keyboardSettingsTitle}" on-click="onKeyboardTap_"
sub-label="$i18n{keyboardSettingsDescription}"
......
......@@ -144,14 +144,6 @@ Polymer({
},
},
allowExperimentalSwitchAccess_: {
type: Boolean,
value() {
return loadTimeData.getBoolean(
'showExperimentalAccessibilitySwitchAccess');
},
},
/** @private */
shouldShowExperimentalCursorColor_: {
type: Boolean,
......@@ -172,14 +164,6 @@ Polymer({
}
},
/** @private */
shouldShowExperimentalSwitchAccess_: {
type: Boolean,
computed: 'computeShouldShowExperimentalSwitchAccess_(' +
'allowExperimentalSwitchAccess_,' +
'isKioskModeActive_)',
},
/** @private */
enableLiveCaption_: {
type: Boolean,
......@@ -502,12 +486,4 @@ Polymer({
shouldShowAdditionalFeaturesLink_(isKiosk, isGuest) {
return !isKiosk && !isGuest;
},
/**
* @return {boolean}
* @private
*/
computeShouldShowExperimentalSwitchAccess_() {
return this.allowExperimentalSwitchAccess_ && !this.isKioskModeActive_;
},
});
......@@ -69,14 +69,12 @@
</settings-captions>
</settings-subpage>
</template>
<template is="dom-if" if="[[showExperimentalSwitchAccess_]]">
<template is="dom-if" route-path="/manageAccessibility/switchAccess">
<settings-subpage associated-control="[[$$('#subpage-trigger')]]"
page-title="$i18n{manageSwitchAccessSettings}">
<settings-switch-access-subpage prefs="{{prefs}}">
</settings-switch-access-subpage>
</settings-subpage>
</template>
<template is="dom-if" route-path="/manageAccessibility/switchAccess">
<settings-subpage associated-control="[[$$('#subpage-trigger')]]"
page-title="$i18n{manageSwitchAccessSettings}">
<settings-switch-access-subpage prefs="{{prefs}}">
</settings-switch-access-subpage>
</settings-subpage>
</template>
</settings-animated-pages>
</template>
......
......@@ -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.
* @private
......
......@@ -269,11 +269,9 @@ cr.define('settings', function() {
r.MANAGE_TTS_SETTINGS = createSubpage(
r.MANAGE_ACCESSIBILITY, mojom.TEXT_TO_SPEECH_SUBPAGE_PATH,
Subpage.kTextToSpeech);
if (loadTimeData.getBoolean('showExperimentalAccessibilitySwitchAccess')) {
r.MANAGE_SWITCH_ACCESS_SETTINGS = createSubpage(
r.MANAGE_ACCESSIBILITY, mojom.SWITCH_ACCESS_OPTIONS_SUBPAGE_PATH,
Subpage.kSwitchAccessOptions);
}
r.MANAGE_SWITCH_ACCESS_SETTINGS = createSubpage(
r.MANAGE_ACCESSIBILITY, mojom.SWITCH_ACCESS_OPTIONS_SUBPAGE_PATH,
Subpage.kSwitchAccessOptions);
r.MANAGE_CAPTION_SETTINGS = createSubpage(
r.MANAGE_ACCESSIBILITY, mojom.CAPTIONS_SUBPAGE_PATH, Subpage.kCaptions);
......
......@@ -201,12 +201,6 @@ const std::vector<SearchConcept>& GetA11ySearchConcepts() {
mojom::SearchResultDefaultRank::kMedium,
mojom::SearchResultType::kSetting,
{.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,
mojom::kManageAccessibilitySubpagePath,
mojom::SearchResultIcon::kA11y,
......@@ -302,11 +296,6 @@ bool IsCursorColorAllowed() {
return features::IsAccessibilityCursorColorEnabled();
}
bool IsSwitchAccessAllowed() {
// TODO(anastasi): Remove this method.
return true;
}
bool IsSwitchAccessTextAllowed() {
return base::CommandLine::ForCurrentProcess()->HasSwitch(
::switches::kEnableExperimentalAccessibilitySwitchAccessText);
......@@ -530,8 +519,6 @@ void AccessibilitySection::AddLoadTimeData(
html_source->AddString("a11yLearnMoreUrl",
chrome::kChromeAccessibilityHelpURL);
html_source->AddBoolean("showExperimentalAccessibilitySwitchAccess",
IsSwitchAccessAllowed());
html_source->AddBoolean(
"showExperimentalAccessibilitySwitchAccessImprovedTextInput",
IsSwitchAccessTextAllowed());
......@@ -658,7 +645,6 @@ void AccessibilitySection::UpdateSearchTags() {
updater.RemoveSearchTags(GetA11yLabelsSearchConcepts());
}
updater.RemoveSearchTags(GetA11ySwitchAccessSearchConcepts());
updater.RemoveSearchTags(GetA11ySwitchAccessOnSearchConcepts());
updater.RemoveSearchTags(GetA11ySwitchAccessKeyboardSearchConcepts());
......@@ -674,11 +660,6 @@ void AccessibilitySection::UpdateSearchTags() {
updater.RemoveSearchTags(GetA11yCursorColorSearchConcepts());
}
if (!IsSwitchAccessAllowed())
return;
updater.AddSearchTags(GetA11ySwitchAccessSearchConcepts());
if (!pref_service_->GetBoolean(
ash::prefs::kAccessibilitySwitchAccessEnabled)) {
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