flag: remove select-to-speak-navigation-control
Navigation controls in Select-to-speak was launched in M89, so cleaning up flags throughout codebase. Bug: 953690 Change-Id: I1be5232a9ad301541212b1cd5dee678f6e918b9b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3248869 Reviewed-by: Xiyuan Xia <xiyuan@chromium.org> Reviewed-by: Katie Dektar <katie@chromium.org> Commit-Queue: Joel Riley <joelriley@google.com> Cr-Commit-Position: refs/heads/main@{#937592}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
7ae9a8deb8
commit
f08ee3804c
ash
accessibility
system
accessibility
chrome
browser
about_flags.ccflag-metadata.jsonflag_descriptions.ccflag_descriptions.h
accessibility
ash
accessibility
resources
chromeos
accessibility
common
extensions
test
data
extensions
api_test
accessibility_private
docs/accessibility/os
third_party/closure_compiler/externs
ui/accessibility
@ -60,7 +60,6 @@
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "components/vector_icons/vector_icons.h"
|
||||
#include "media/base/media_switches.h"
|
||||
#include "ui/accessibility/accessibility_features.h"
|
||||
#include "ui/accessibility/accessibility_switches.h"
|
||||
#include "ui/accessibility/aura/aura_window_properties.h"
|
||||
#include "ui/aura/window.h"
|
||||
@ -1093,9 +1092,6 @@ void AccessibilityControllerImpl::ShowSelectToSpeakPanel(
|
||||
const gfx::Rect& anchor,
|
||||
bool is_paused,
|
||||
double speech_rate) {
|
||||
if (!features::IsSelectToSpeakNavigationControlEnabled()) {
|
||||
return;
|
||||
}
|
||||
if (!select_to_speak_bubble_controller_) {
|
||||
select_to_speak_bubble_controller_ =
|
||||
std::make_unique<SelectToSpeakMenuBubbleController>();
|
||||
@ -1104,8 +1100,7 @@ void AccessibilityControllerImpl::ShowSelectToSpeakPanel(
|
||||
}
|
||||
|
||||
void AccessibilityControllerImpl::HideSelectToSpeakPanel() {
|
||||
if (!features::IsSelectToSpeakNavigationControlEnabled() ||
|
||||
!select_to_speak_bubble_controller_) {
|
||||
if (!select_to_speak_bubble_controller_) {
|
||||
return;
|
||||
}
|
||||
select_to_speak_bubble_controller_->Hide();
|
||||
@ -1114,7 +1109,7 @@ void AccessibilityControllerImpl::HideSelectToSpeakPanel() {
|
||||
void AccessibilityControllerImpl::OnSelectToSpeakPanelAction(
|
||||
SelectToSpeakPanelAction action,
|
||||
double value) {
|
||||
if (!features::IsSelectToSpeakNavigationControlEnabled() || !client_) {
|
||||
if (!client_) {
|
||||
return;
|
||||
}
|
||||
client_->OnSelectToSpeakPanelAction(action, value);
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include "ash/system/accessibility/select_to_speak/select_to_speak_menu_view.h"
|
||||
#include "ash/test/ash_test_base.h"
|
||||
#include "base/test/scoped_feature_list.h"
|
||||
#include "ui/accessibility/accessibility_features.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/display/display.h"
|
||||
#include "ui/display/screen.h"
|
||||
@ -33,8 +32,6 @@ class SelectToSpeakMenuBubbleControllerTest : public AshTestBase {
|
||||
// AshTestBase:
|
||||
void SetUp() override {
|
||||
AshTestBase::SetUp();
|
||||
scoped_feature_list_.InitAndEnableFeature(
|
||||
::features::kSelectToSpeakNavigationControl);
|
||||
Shell::Get()->accessibility_controller()->select_to_speak().SetEnabled(
|
||||
true);
|
||||
}
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include "ash/system/tray/hover_highlight_view.h"
|
||||
#include "ash/test/ash_test_base.h"
|
||||
#include "base/test/scoped_feature_list.h"
|
||||
#include "ui/accessibility/accessibility_features.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/display/display.h"
|
||||
#include "ui/display/screen.h"
|
||||
@ -37,8 +36,6 @@ class SelectToSpeakSpeedBubbleControllerTest : public AshTestBase {
|
||||
// AshTestBase:
|
||||
void SetUp() override {
|
||||
AshTestBase::SetUp();
|
||||
scoped_feature_list_.InitAndEnableFeature(
|
||||
::features::kSelectToSpeakNavigationControl);
|
||||
Shell::Get()->accessibility_controller()->select_to_speak().SetEnabled(
|
||||
true);
|
||||
}
|
||||
|
@ -5832,11 +5832,6 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kWebuiDarkModeDescription, kOsCrOS,
|
||||
FEATURE_VALUE_TYPE(features::kWebUIDarkMode)},
|
||||
|
||||
{"select-to-speak-navigation-control",
|
||||
flag_descriptions::kSelectToSpeakNavigationControlName,
|
||||
flag_descriptions::kSelectToSpeakNavigationControlDescription, kOsCrOS,
|
||||
FEATURE_VALUE_TYPE(features::kSelectToSpeakNavigationControl)},
|
||||
|
||||
{"enable-networking-in-diagnostics-app",
|
||||
flag_descriptions::kEnableNetworkingInDiagnosticsAppName,
|
||||
flag_descriptions::kEnableNetworkingInDiagnosticsAppDescription, kOsCrOS,
|
||||
|
@ -634,10 +634,6 @@ AccessibilityPrivateIsFeatureEnabledFunction::Run() {
|
||||
accessibility_private::AccessibilityFeature params_feature = params->feature;
|
||||
bool enabled;
|
||||
switch (params_feature) {
|
||||
case accessibility_private::AccessibilityFeature::
|
||||
ACCESSIBILITY_FEATURE_SELECTTOSPEAKNAVIGATIONCONTROL:
|
||||
enabled = ::features::IsSelectToSpeakNavigationControlEnabled();
|
||||
break;
|
||||
case accessibility_private::AccessibilityFeature::
|
||||
ACCESSIBILITY_FEATURE_ENHANCEDNETWORKVOICES:
|
||||
enabled = ::features::IsEnhancedNetworkVoicesEnabled();
|
||||
|
@ -98,10 +98,10 @@ class AccessibilityPrivateApiFeatureTest : public AccessibilityPrivateApiTest {
|
||||
AccessibilityPrivateApiFeatureTest() {
|
||||
if (enabled) {
|
||||
scoped_feature_list_.InitAndEnableFeature(
|
||||
::features::kSelectToSpeakNavigationControl);
|
||||
::features::kEnhancedNetworkVoices);
|
||||
} else {
|
||||
scoped_feature_list_.InitAndDisableFeature(
|
||||
::features::kSelectToSpeakNavigationControl);
|
||||
::features::kEnhancedNetworkVoices);
|
||||
}
|
||||
}
|
||||
~AccessibilityPrivateApiFeatureTest() override = default;
|
||||
|
@ -4787,11 +4787,6 @@
|
||||
"owners": ["ryansturm"],
|
||||
"expiry_milestone": 95
|
||||
},
|
||||
{
|
||||
"name": "select-to-speak-navigation-control",
|
||||
"owners": [ "joelriley@google.com" ],
|
||||
"expiry_milestone": 89
|
||||
},
|
||||
{
|
||||
"name": "semantic-colors-debug-override",
|
||||
"owners": [ "calamity@chromium.org" ],
|
||||
|
@ -4995,11 +4995,6 @@ const char kSchedulerConfigurationConservative[] =
|
||||
const char kSchedulerConfigurationPerformance[] =
|
||||
"Enables Hyper-Threading on relevant CPUs.";
|
||||
|
||||
const char kSelectToSpeakNavigationControlName[] =
|
||||
"Select-to-speak navigation control";
|
||||
const char kSelectToSpeakNavigationControlDescription[] =
|
||||
"Enables enhanced Select-to-speak navigation features.";
|
||||
|
||||
const char kChromeOSSharingHubName[] = "Chrome OS Sharing Hub";
|
||||
const char kChromeOSSharingHubDescription[] =
|
||||
"Enables the Sharing Hub (share sheet) on ChromeOS via the Omnibox.";
|
||||
|
@ -2884,9 +2884,6 @@ extern const char kSchedulerConfigurationDescription[];
|
||||
extern const char kSchedulerConfigurationConservative[];
|
||||
extern const char kSchedulerConfigurationPerformance[];
|
||||
|
||||
extern const char kSelectToSpeakNavigationControlName[];
|
||||
extern const char kSelectToSpeakNavigationControlDescription[];
|
||||
|
||||
extern const char kChromeOSSharingHubName[];
|
||||
extern const char kChromeOSSharingHubDescription[];
|
||||
|
||||
|
@ -148,7 +148,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<hr aria-hidden="true">
|
||||
<div class="option hidden" id="navigationControlsOption">
|
||||
<div class="option" id="navigationControlsOption">
|
||||
<input id="navigationControls" type="checkbox" role="switch"
|
||||
class="checkbox" name="navigationControls"
|
||||
aria-labeledby="navigationControlsLabel">
|
||||
|
@ -183,16 +183,6 @@ export class SelectToSpeak {
|
||||
this.enableLanguageDetectionIntegration_ = result;
|
||||
});
|
||||
|
||||
/**
|
||||
* Feature flag controlling STS navigation control.
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.navigationControlFlag_ = false;
|
||||
chrome.accessibilityPrivate.isFeatureEnabled(
|
||||
AccessibilityFeature.SELECT_TO_SPEAK_NAVIGATION_CONTROL, (result) => {
|
||||
this.navigationControlFlag_ = result;
|
||||
});
|
||||
|
||||
/**
|
||||
* Feature flag controlling availability of enhanced network voices
|
||||
* @type {boolean}
|
||||
@ -245,8 +235,7 @@ export class SelectToSpeak {
|
||||
* @private
|
||||
*/
|
||||
shouldShowNavigationControls_() {
|
||||
return this.navigationControlFlag_ &&
|
||||
this.prefsManager_.navigationControlsEnabled() &&
|
||||
return this.prefsManager_.navigationControlsEnabled() &&
|
||||
this.supportsNavigationPanel_;
|
||||
}
|
||||
|
||||
|
@ -42,11 +42,6 @@ SelectToSpeakNavigationControlTest = class extends SelectToSpeakE2ETest {
|
||||
})();
|
||||
}
|
||||
|
||||
/** @override */
|
||||
get featureList() {
|
||||
return {enabled: ['features::kSelectToSpeakNavigationControl']};
|
||||
}
|
||||
|
||||
generateHtmlWithSelectedElement(elementId, bodyHtml) {
|
||||
return `
|
||||
<script type="text/javascript">
|
||||
|
@ -86,12 +86,6 @@ class SelectToSpeakOptionsPage {
|
||||
this.setElementVisible(elem, checked);
|
||||
});
|
||||
this.syncCheckboxControlToPref_('navigationControls', 'navigationControls');
|
||||
// Hide navigation control setting if feature is not enabled
|
||||
chrome.accessibilityPrivate.isFeatureEnabled(
|
||||
AccessibilityFeature.SELECT_TO_SPEAK_NAVIGATION_CONTROL, (result) => {
|
||||
const elem = document.getElementById('navigationControlsOption');
|
||||
this.setElementVisible(elem, result);
|
||||
});
|
||||
|
||||
this.setUpHighlightListener_();
|
||||
this.setUpTtsButtonClickListener_();
|
||||
|
@ -234,7 +234,7 @@
|
||||
{
|
||||
"id": "AccessibilityFeature",
|
||||
"type": "string",
|
||||
"enum": [ "selectToSpeakNavigationControl", "enhancedNetworkVoices", "dictationCommands" ],
|
||||
"enum": [ "enhancedNetworkVoices", "dictationCommands" ],
|
||||
"description": "Subset of accessibility features."
|
||||
},
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ var availableTests = [
|
||||
|
||||
function testFeatureDisabled() {
|
||||
chrome.accessibilityPrivate.isFeatureEnabled(
|
||||
'selectToSpeakNavigationControl', (enabled) => {
|
||||
'enhancedNetworkVoices', (enabled) => {
|
||||
chrome.test.assertFalse(enabled);
|
||||
chrome.test.succeed();
|
||||
});
|
||||
@ -65,7 +65,7 @@ var availableTests = [
|
||||
|
||||
function testFeatureEnabled() {
|
||||
chrome.accessibilityPrivate.isFeatureEnabled(
|
||||
'selectToSpeakNavigationControl', (enabled) => {
|
||||
'enhancedNetworkVoices', (enabled) => {
|
||||
chrome.test.assertTrue(enabled);
|
||||
chrome.test.succeed();
|
||||
});
|
||||
|
@ -194,10 +194,9 @@ for STS state.
|
||||
|
||||
### Navigation features
|
||||
|
||||
When `select-to-speak-navigation-control` flag is enabled, STS will display a
|
||||
floating control panel when activated. The control panel hosts controls for
|
||||
pause/resume, updating reading speed, navigating by sentence or paragraph,
|
||||
and deactivating STS.
|
||||
STS will display a floating control panel when activated. The control panel
|
||||
hosts controls for pause/resume, updating reading speed, navigating by sentence
|
||||
or paragraph, and deactivating STS.
|
||||
|
||||
#### Floating control panel
|
||||
|
||||
|
@ -298,7 +298,6 @@ chrome.accessibilityPrivate.AcceleratorAction = {
|
||||
* @enum {string}
|
||||
*/
|
||||
chrome.accessibilityPrivate.AccessibilityFeature = {
|
||||
SELECT_TO_SPEAK_NAVIGATION_CONTROL: 'selectToSpeakNavigationControl',
|
||||
ENHANCED_NETWORK_VOICES: 'enhancedNetworkVoices',
|
||||
DICTATION_COMMANDS: 'dictationCommands',
|
||||
};
|
||||
|
@ -180,16 +180,6 @@ bool IsAriaElementReflectionEnabled() {
|
||||
return base::FeatureList::IsEnabled(::features::kEnableAriaElementReflection);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
const base::Feature kSelectToSpeakNavigationControl{
|
||||
"SelectToSpeakNavigationControl", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
bool IsSelectToSpeakNavigationControlEnabled() {
|
||||
return base::FeatureList::IsEnabled(
|
||||
::features::kSelectToSpeakNavigationControl);
|
||||
}
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
const base::Feature kComputeAXMode{"ComputeAXMode",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
@ -153,15 +153,6 @@ AX_BASE_EXPORT extern const base::Feature kEnableAriaElementReflection;
|
||||
// Returns true if ARIA element reflection is enabled.
|
||||
AX_BASE_EXPORT bool IsAriaElementReflectionEnabled();
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
// Enables enhanced Select-to-speak features that allow users broader control
|
||||
// of TTS (pause, resume, skip between sentences and paragraphs).
|
||||
AX_BASE_EXPORT extern const base::Feature kSelectToSpeakNavigationControl;
|
||||
|
||||
// Returns true if enhanced Select-to-speak features are enabled.
|
||||
AX_BASE_EXPORT bool IsSelectToSpeakNavigationControlEnabled();
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
// Compute the AXMode based on AccessibilityServiceInfo. If disabled,
|
||||
// the AXMode is either entirely on or entirely off.
|
||||
|
Reference in New Issue
Block a user