Commit f251a33e authored by Megan Jablonski's avatar Megan Jablonski Committed by Commit Bot

Revert "Add Select-to-Speak to accessibility menu in status tray."

This reverts commit 8965b37f.

Reason for revert: TrayAccessibilityTestInstance tests failing on bots

https://uberchromegw.corp.google.com/i/chromium.chromiumos/builders/linux-chromeos-dbg

https://uberchromegw.corp.google.com/i/chromium.chromiumos/builders/linux-chromeos-dbg/builds/4171

Original change's description:
> Add Select-to-Speak to accessibility menu in status tray.
> 
> Includes new icon for Select-to-Speak.
> Having STS in the status tray was approved by UX over email, so this is
> not behind any flags.
> 
> Bug: 804506
> Change-Id: Icdeda04e2c10db7ba891cfed585db0027dcb97b5
> Reviewed-on: https://chromium-review.googlesource.com/904968
> Commit-Queue: Katie Dektar <katie@chromium.org>
> Reviewed-by: James Cook <jamescook@chromium.org>
> Reviewed-by: Ilya Sherman <isherman@chromium.org>
> Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#535813}

TBR=jamescook@chromium.org,tbarzic@chromium.org,dmazzoni@chromium.org,isherman@chromium.org,katie@chromium.org

Change-Id: Iba6c1fb5b36483bfd75adcde1e67e8036ad0d5a4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 804506
Reviewed-on: https://chromium-review.googlesource.com/911884Reviewed-by: default avatarMegan Jablonski <megjablon@chromium.org>
Commit-Queue: Megan Jablonski <megjablon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535904}
parent b62c1a3c
...@@ -81,8 +81,6 @@ void AccessibilityController::RegisterProfilePrefs(PrefRegistrySimple* registry, ...@@ -81,8 +81,6 @@ void AccessibilityController::RegisterProfilePrefs(PrefRegistrySimple* registry,
false); false);
registry->RegisterBooleanPref(prefs::kAccessibilitySpokenFeedbackEnabled, registry->RegisterBooleanPref(prefs::kAccessibilitySpokenFeedbackEnabled,
false); false);
registry->RegisterBooleanPref(prefs::kAccessibilitySelectToSpeakEnabled,
false);
return; return;
} }
...@@ -96,7 +94,6 @@ void AccessibilityController::RegisterProfilePrefs(PrefRegistrySimple* registry, ...@@ -96,7 +94,6 @@ void AccessibilityController::RegisterProfilePrefs(PrefRegistrySimple* registry,
registry->RegisterForeignPref(prefs::kAccessibilityMonoAudioEnabled); registry->RegisterForeignPref(prefs::kAccessibilityMonoAudioEnabled);
registry->RegisterForeignPref(prefs::kAccessibilityScreenMagnifierEnabled); registry->RegisterForeignPref(prefs::kAccessibilityScreenMagnifierEnabled);
registry->RegisterForeignPref(prefs::kAccessibilitySpokenFeedbackEnabled); registry->RegisterForeignPref(prefs::kAccessibilitySpokenFeedbackEnabled);
registry->RegisterForeignPref(prefs::kAccessibilitySelectToSpeakEnabled);
} }
void AccessibilityController::BindRequest( void AccessibilityController::BindRequest(
...@@ -167,18 +164,6 @@ bool AccessibilityController::IsSpokenFeedbackEnabled() const { ...@@ -167,18 +164,6 @@ bool AccessibilityController::IsSpokenFeedbackEnabled() const {
return spoken_feedback_enabled_; return spoken_feedback_enabled_;
} }
void AccessibilityController::SetSelectToSpeakEnabled(bool enabled) {
PrefService* prefs = GetActivePrefService();
if (!prefs)
return;
prefs->SetBoolean(prefs::kAccessibilitySelectToSpeakEnabled, enabled);
prefs->CommitPendingWrite();
}
bool AccessibilityController::IsSelectToSpeakEnabled() const {
return select_to_speak_enabled_;
}
void AccessibilityController::TriggerAccessibilityAlert( void AccessibilityController::TriggerAccessibilityAlert(
mojom::AccessibilityAlert alert) { mojom::AccessibilityAlert alert) {
if (client_) if (client_)
...@@ -277,10 +262,6 @@ void AccessibilityController::ObservePrefs(PrefService* prefs) { ...@@ -277,10 +262,6 @@ void AccessibilityController::ObservePrefs(PrefService* prefs) {
prefs::kAccessibilitySpokenFeedbackEnabled, prefs::kAccessibilitySpokenFeedbackEnabled,
base::Bind(&AccessibilityController::UpdateSpokenFeedbackFromPref, base::Bind(&AccessibilityController::UpdateSpokenFeedbackFromPref,
base::Unretained(this))); base::Unretained(this)));
pref_change_registrar_->Add(
prefs::kAccessibilitySelectToSpeakEnabled,
base::Bind(&AccessibilityController::UpdateSelectToSpeakFromPref,
base::Unretained(this)));
// Load current state. // Load current state.
UpdateAutoclickFromPref(); UpdateAutoclickFromPref();
...@@ -289,7 +270,6 @@ void AccessibilityController::ObservePrefs(PrefService* prefs) { ...@@ -289,7 +270,6 @@ void AccessibilityController::ObservePrefs(PrefService* prefs) {
UpdateLargeCursorFromPref(); UpdateLargeCursorFromPref();
UpdateMonoAudioFromPref(); UpdateMonoAudioFromPref();
UpdateSpokenFeedbackFromPref(); UpdateSpokenFeedbackFromPref();
UpdateSelectToSpeakFromPref();
} }
void AccessibilityController::UpdateAutoclickFromPref() { void AccessibilityController::UpdateAutoclickFromPref() {
...@@ -415,17 +395,4 @@ void AccessibilityController::UpdateSpokenFeedbackFromPref() { ...@@ -415,17 +395,4 @@ void AccessibilityController::UpdateSpokenFeedbackFromPref() {
// prefs ownership and registration is moved to ash. // prefs ownership and registration is moved to ash.
} }
void AccessibilityController::UpdateSelectToSpeakFromPref() {
PrefService* prefs = GetActivePrefService();
const bool enabled =
prefs->GetBoolean(prefs::kAccessibilitySelectToSpeakEnabled);
if (select_to_speak_enabled_ == enabled)
return;
select_to_speak_enabled_ = enabled;
NotifyAccessibilityStatusChanged(A11Y_NOTIFICATION_NONE);
}
} // namespace ash } // namespace ash
...@@ -61,9 +61,6 @@ class ASH_EXPORT AccessibilityController ...@@ -61,9 +61,6 @@ class ASH_EXPORT AccessibilityController
AccessibilityNotificationVisibility notify); AccessibilityNotificationVisibility notify);
bool IsSpokenFeedbackEnabled() const; bool IsSpokenFeedbackEnabled() const;
void SetSelectToSpeakEnabled(bool enabled);
bool IsSelectToSpeakEnabled() const;
bool braille_display_connected() const { return braille_display_connected_; } bool braille_display_connected() const { return braille_display_connected_; }
// Triggers an accessibility alert to give the user feedback. // Triggers an accessibility alert to give the user feedback.
...@@ -108,7 +105,6 @@ class ASH_EXPORT AccessibilityController ...@@ -108,7 +105,6 @@ class ASH_EXPORT AccessibilityController
void UpdateLargeCursorFromPref(); void UpdateLargeCursorFromPref();
void UpdateMonoAudioFromPref(); void UpdateMonoAudioFromPref();
void UpdateSpokenFeedbackFromPref(); void UpdateSpokenFeedbackFromPref();
void UpdateSelectToSpeakFromPref();
service_manager::Connector* connector_ = nullptr; service_manager::Connector* connector_ = nullptr;
std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_; std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_;
...@@ -126,7 +122,6 @@ class ASH_EXPORT AccessibilityController ...@@ -126,7 +122,6 @@ class ASH_EXPORT AccessibilityController
int large_cursor_size_in_dip_ = kDefaultLargeCursorSize; int large_cursor_size_in_dip_ = kDefaultLargeCursorSize;
bool mono_audio_enabled_ = false; bool mono_audio_enabled_ = false;
bool spoken_feedback_enabled_ = false; bool spoken_feedback_enabled_ = false;
bool select_to_speak_enabled_ = false;
bool braille_display_connected_ = false; bool braille_display_connected_ = false;
// TODO(warx): consider removing this and replacing it with a more reliable // TODO(warx): consider removing this and replacing it with a more reliable
......
...@@ -48,11 +48,11 @@ bool DefaultAccessibilityDelegate::IsCursorHighlightEnabled() const { ...@@ -48,11 +48,11 @@ bool DefaultAccessibilityDelegate::IsCursorHighlightEnabled() const {
} }
void DefaultAccessibilityDelegate::SetFocusHighlightEnabled(bool enabled) { void DefaultAccessibilityDelegate::SetFocusHighlightEnabled(bool enabled) {
focus_highlight_enabled_ = enabled; focus_highligh_enabled_ = enabled;
} }
bool DefaultAccessibilityDelegate::IsFocusHighlightEnabled() const { bool DefaultAccessibilityDelegate::IsFocusHighlightEnabled() const {
return focus_highlight_enabled_; return focus_highligh_enabled_;
} }
void DefaultAccessibilityDelegate::SetStickyKeysEnabled(bool enabled) { void DefaultAccessibilityDelegate::SetStickyKeysEnabled(bool enabled) {
......
...@@ -43,7 +43,7 @@ class ASH_EXPORT DefaultAccessibilityDelegate : public AccessibilityDelegate { ...@@ -43,7 +43,7 @@ class ASH_EXPORT DefaultAccessibilityDelegate : public AccessibilityDelegate {
bool virtual_keyboard_enabled_ = false; bool virtual_keyboard_enabled_ = false;
bool caret_highlight_enabled_ = false; bool caret_highlight_enabled_ = false;
bool cursor_highlight_enabled_ = false; bool cursor_highlight_enabled_ = false;
bool focus_highlight_enabled_ = false; bool focus_highligh_enabled_ = false;
bool sticky_keys_enabled_ = false; bool sticky_keys_enabled_ = false;
bool tap_dragging_enabled_ = false; bool tap_dragging_enabled_ = false;
......
...@@ -365,9 +365,6 @@ This file contains the strings for ash. ...@@ -365,9 +365,6 @@ This file contains the strings for ash.
system tray to toggle on/off spoken feedback feature."> system tray to toggle on/off spoken feedback feature.">
ChromeVox (spoken feedback) ChromeVox (spoken feedback)
</message> </message>
<message name="IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SELECT_TO_SPEAK" desc="The label used in the accessibility menu of the system tray to toggle on/off the select-to-speak feature.">
Select-to-Speak
</message>
<message name="IDS_ASH_STATUS_TRAY_ACCESSIBILITY_HIGH_CONTRAST_MODE" desc="The label used in the accessibility menu of the system tray to toggle on/off high contrast feature."> <message name="IDS_ASH_STATUS_TRAY_ACCESSIBILITY_HIGH_CONTRAST_MODE" desc="The label used in the accessibility menu of the system tray to toggle on/off high contrast feature.">
High contrast mode High contrast mode
</message> </message>
......
...@@ -153,8 +153,6 @@ aggregate_vector_icons("ash_vector_icons") { ...@@ -153,8 +153,6 @@ aggregate_vector_icons("ash_vector_icons") {
"system_menu_accessibility_contrast.1x.icon", "system_menu_accessibility_contrast.1x.icon",
"system_menu_accessibility_contrast.icon", "system_menu_accessibility_contrast.icon",
"system_menu_accessibility_screen_magnifier.1x.icon", "system_menu_accessibility_screen_magnifier.1x.icon",
"system_menu_accessibility_select_to_speak.1x.icon",
"system_menu_accessibility_select_to_speak.icon",
"system_menu_audio_input.icon", "system_menu_audio_input.icon",
"system_menu_audio_input.1x.icon", "system_menu_audio_input.1x.icon",
"system_menu_audio_output.icon", "system_menu_audio_output.icon",
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
CANVAS_DIMENSIONS, 20,
MOVE_TO, 14, 14,
LINE_TO, 13, 14,
LINE_TO, 13, 15,
LINE_TO, 15, 15,
LINE_TO, 15, 14,
LINE_TO, 15, 13,
LINE_TO, 14, 13,
LINE_TO, 14, 14,
CLOSE,
MOVE_TO, 6, 6,
LINE_TO, 7, 6,
LINE_TO, 7, 5,
LINE_TO, 5, 5,
LINE_TO, 5, 6,
LINE_TO, 5, 7,
LINE_TO, 6, 7,
LINE_TO, 6, 6,
CLOSE,
MOVE_TO, 10, 18,
CUBIC_TO, 5.58f, 18, 2, 14.42f, 2, 10,
CUBIC_TO, 2, 5.58f, 5.58f, 2, 10, 2,
CUBIC_TO, 14.42f, 2, 18, 5.58f, 18, 10,
CUBIC_TO, 18, 14.42f, 14.42f, 18, 10, 18,
CLOSE,
MOVE_TO, 6, 8.63f,
LINE_TO, 6, 11.37f,
LINE_TO, 7.78f, 11.37f,
LINE_TO, 10, 13.65f,
LINE_TO, 10, 6.35f,
LINE_TO, 7.78f, 8.63f,
LINE_TO, 6, 8.63f,
CLOSE,
MOVE_TO, 12, 10,
CUBIC_TO, 12, 9.19f, 11.55f, 8.5f, 10.89f, 8.16f,
LINE_TO, 10.89f, 11.83f,
CUBIC_TO, 11.55f, 11.5f, 12, 10.81f, 12, 10,
CLOSE,
MOVE_TO, 10.89f, 6,
LINE_TO, 10.89f, 6.94f,
CUBIC_TO, 12.17f, 7.33f, 13.11f, 8.55f, 13.11f, 10,
CUBIC_TO, 13.11f, 11.45f, 12.17f, 12.67f, 10.89f, 13.06f,
LINE_TO, 10.89f, 14,
CUBIC_TO, 12.67f, 13.58f, 14, 11.95f, 14, 10,
CUBIC_TO, 14, 8.05f, 12.67f, 6.42f, 10.89f, 6,
CLOSE,
END
\ No newline at end of file
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
CANVAS_DIMENSIONS, 40,
MOVE_TO, 28, 28,
LINE_TO, 26, 28,
LINE_TO, 26, 30,
LINE_TO, 30, 30,
LINE_TO, 30, 28,
LINE_TO, 30, 26,
LINE_TO, 28, 26,
LINE_TO, 28, 28,
CLOSE,
MOVE_TO, 12, 12,
LINE_TO, 14, 12,
LINE_TO, 14, 10,
LINE_TO, 10, 10,
LINE_TO, 10, 12,
LINE_TO, 10, 14,
LINE_TO, 12, 14,
LINE_TO, 12, 12,
CLOSE,
MOVE_TO, 20, 36,
CUBIC_TO, 11.16f, 36, 4, 28.84f, 4, 20,
CUBIC_TO, 4, 11.16f, 11.16f, 4, 20, 4,
CUBIC_TO, 28.84f, 4, 36, 11.16f, 36, 20,
CUBIC_TO, 36, 28.84f, 28.84f, 36, 20, 36,
CLOSE,
MOVE_TO, 12, 17.26f,
LINE_TO, 12, 22.74f,
LINE_TO, 15.56f, 22.74f,
LINE_TO, 20, 27.3f,
LINE_TO, 20, 12.7f,
LINE_TO, 15.56f, 17.26f,
LINE_TO, 12, 17.26f,
CLOSE,
MOVE_TO, 24, 20,
CUBIC_TO, 24, 18.39f, 23.09f, 17, 21.78f, 16.32f,
LINE_TO, 21.78f, 23.67f,
CUBIC_TO, 23.09f, 23, 24, 21.61f, 24, 20,
CLOSE,
MOVE_TO, 21.78f, 12,
LINE_TO, 21.78f, 13.88f,
CUBIC_TO, 24.35f, 14.66f, 26.22f, 17.11f, 26.22f, 20,
CUBIC_TO, 26.22f, 22.89f, 24.35f, 25.34f, 21.78f, 26.12f,
LINE_TO, 21.78f, 28,
CUBIC_TO, 25.34f, 27.17f, 28, 23.9f, 28, 20,
CUBIC_TO, 28, 16.1f, 25.34f, 12.83f, 21.78f, 12,
CLOSE,
END
...@@ -23,9 +23,7 @@ ...@@ -23,9 +23,7 @@
#include "ash/system/tray/tray_item_more.h" #include "ash/system/tray/tray_item_more.h"
#include "ash/system/tray/tray_popup_utils.h" #include "ash/system/tray/tray_popup_utils.h"
#include "ash/system/tray/tri_view.h" #include "ash/system/tray/tri_view.h"
#include "base/command_line.h"
#include "base/metrics/user_metrics.h" #include "base/metrics/user_metrics.h"
#include "chromeos/chromeos_switches.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image.h" #include "ui/gfx/image/image.h"
#include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/paint_vector_icon.h"
...@@ -58,7 +56,6 @@ enum AccessibilityState { ...@@ -58,7 +56,6 @@ enum AccessibilityState {
A11Y_HIGHLIGHT_KEYBOARD_FOCUS = 1 << 10, A11Y_HIGHLIGHT_KEYBOARD_FOCUS = 1 << 10,
A11Y_STICKY_KEYS = 1 << 11, A11Y_STICKY_KEYS = 1 << 11,
A11Y_TAP_DRAGGING = 1 << 12, A11Y_TAP_DRAGGING = 1 << 12,
A11Y_SELECT_TO_SPEAK = 1 << 13,
}; };
uint32_t GetAccessibilityState() { uint32_t GetAccessibilityState() {
...@@ -92,9 +89,6 @@ uint32_t GetAccessibilityState() { ...@@ -92,9 +89,6 @@ uint32_t GetAccessibilityState() {
state |= A11Y_STICKY_KEYS; state |= A11Y_STICKY_KEYS;
if (delegate->IsTapDraggingEnabled()) if (delegate->IsTapDraggingEnabled())
state |= A11Y_TAP_DRAGGING; state |= A11Y_TAP_DRAGGING;
if (controller->IsSelectToSpeakEnabled()) {
state |= A11Y_SELECT_TO_SPEAK;
}
return state; return state;
} }
...@@ -163,10 +157,6 @@ void AccessibilityDetailedView::OnAccessibilityStatusChanged() { ...@@ -163,10 +157,6 @@ void AccessibilityDetailedView::OnAccessibilityStatusChanged() {
TrayPopupUtils::UpdateCheckMarkVisibility(spoken_feedback_view_, TrayPopupUtils::UpdateCheckMarkVisibility(spoken_feedback_view_,
spoken_feedback_enabled_); spoken_feedback_enabled_);
select_to_speak_enabled_ = controller->IsSelectToSpeakEnabled();
TrayPopupUtils::UpdateCheckMarkVisibility(select_to_speak_view_,
select_to_speak_enabled_);
high_contrast_enabled_ = controller->IsHighContrastEnabled(); high_contrast_enabled_ = controller->IsHighContrastEnabled();
TrayPopupUtils::UpdateCheckMarkVisibility(high_contrast_view_, TrayPopupUtils::UpdateCheckMarkVisibility(high_contrast_view_,
high_contrast_enabled_); high_contrast_enabled_);
...@@ -228,13 +218,6 @@ void AccessibilityDetailedView::AppendAccessibilityList() { ...@@ -228,13 +218,6 @@ void AccessibilityDetailedView::AppendAccessibilityList() {
IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SPOKEN_FEEDBACK), IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SPOKEN_FEEDBACK),
spoken_feedback_enabled_); spoken_feedback_enabled_);
select_to_speak_enabled_ = controller->IsSelectToSpeakEnabled();
select_to_speak_view_ = AddScrollListCheckableItem(
kSystemMenuAccessibilitySelectToSpeakIcon,
l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SELECT_TO_SPEAK),
select_to_speak_enabled_);
high_contrast_enabled_ = controller->IsHighContrastEnabled(); high_contrast_enabled_ = controller->IsHighContrastEnabled();
high_contrast_view_ = AddScrollListCheckableItem( high_contrast_view_ = AddScrollListCheckableItem(
kSystemMenuAccessibilityContrastIcon, kSystemMenuAccessibilityContrastIcon,
...@@ -322,12 +305,6 @@ void AccessibilityDetailedView::HandleViewClicked(views::View* view) { ...@@ -322,12 +305,6 @@ void AccessibilityDetailedView::HandleViewClicked(views::View* view) {
? UserMetricsAction("StatusArea_SpokenFeedbackEnabled") ? UserMetricsAction("StatusArea_SpokenFeedbackEnabled")
: UserMetricsAction("StatusArea_SpokenFeedbackDisabled")); : UserMetricsAction("StatusArea_SpokenFeedbackDisabled"));
controller->SetSpokenFeedbackEnabled(new_state, A11Y_NOTIFICATION_NONE); controller->SetSpokenFeedbackEnabled(new_state, A11Y_NOTIFICATION_NONE);
} else if (view == select_to_speak_view_) {
bool new_state = !controller->IsSelectToSpeakEnabled();
RecordAction(new_state
? UserMetricsAction("StatusArea_SelectToSpeakEnabled")
: UserMetricsAction("StatusArea_SelectToSpeakDisabled"));
controller->SetSelectToSpeakEnabled(new_state);
} else if (view == high_contrast_view_) { } else if (view == high_contrast_view_) {
bool new_state = !controller->IsHighContrastEnabled(); bool new_state = !controller->IsHighContrastEnabled();
RecordAction(new_state RecordAction(new_state
......
...@@ -59,7 +59,6 @@ class AccessibilityDetailedView : public TrayDetailsView { ...@@ -59,7 +59,6 @@ class AccessibilityDetailedView : public TrayDetailsView {
void AppendAccessibilityList(); void AppendAccessibilityList();
HoverHighlightView* spoken_feedback_view_ = nullptr; HoverHighlightView* spoken_feedback_view_ = nullptr;
HoverHighlightView* select_to_speak_view_ = nullptr;
HoverHighlightView* high_contrast_view_ = nullptr; HoverHighlightView* high_contrast_view_ = nullptr;
HoverHighlightView* screen_magnifier_view_ = nullptr; HoverHighlightView* screen_magnifier_view_ = nullptr;
HoverHighlightView* large_cursor_view_ = nullptr; HoverHighlightView* large_cursor_view_ = nullptr;
...@@ -76,7 +75,6 @@ class AccessibilityDetailedView : public TrayDetailsView { ...@@ -76,7 +75,6 @@ class AccessibilityDetailedView : public TrayDetailsView {
// These exist for tests. The canonical state is stored in prefs. // These exist for tests. The canonical state is stored in prefs.
bool spoken_feedback_enabled_ = false; bool spoken_feedback_enabled_ = false;
bool select_to_speak_enabled_ = false;
bool high_contrast_enabled_ = false; bool high_contrast_enabled_ = false;
bool screen_magnifier_enabled_ = false; bool screen_magnifier_enabled_ = false;
bool large_cursor_enabled_ = false; bool large_cursor_enabled_ = false;
......
...@@ -352,7 +352,6 @@ bool AccessibilityManager::ShouldShowAccessibilityMenu() { ...@@ -352,7 +352,6 @@ bool AccessibilityManager::ShouldShowAccessibilityMenu() {
if (prefs->GetBoolean(ash::prefs::kAccessibilityStickyKeysEnabled) || if (prefs->GetBoolean(ash::prefs::kAccessibilityStickyKeysEnabled) ||
prefs->GetBoolean(ash::prefs::kAccessibilityLargeCursorEnabled) || prefs->GetBoolean(ash::prefs::kAccessibilityLargeCursorEnabled) ||
prefs->GetBoolean(ash::prefs::kAccessibilitySpokenFeedbackEnabled) || prefs->GetBoolean(ash::prefs::kAccessibilitySpokenFeedbackEnabled) ||
prefs->GetBoolean(ash::prefs::kAccessibilitySelectToSpeakEnabled) ||
prefs->GetBoolean(ash::prefs::kAccessibilityHighContrastEnabled) || prefs->GetBoolean(ash::prefs::kAccessibilityHighContrastEnabled) ||
prefs->GetBoolean(ash::prefs::kAccessibilityAutoclickEnabled) || prefs->GetBoolean(ash::prefs::kAccessibilityAutoclickEnabled) ||
prefs->GetBoolean(ash::prefs::kShouldAlwaysShowAccessibilityMenu) || prefs->GetBoolean(ash::prefs::kShouldAlwaysShowAccessibilityMenu) ||
...@@ -872,7 +871,7 @@ bool AccessibilityManager::IsSelectToSpeakEnabled() const { ...@@ -872,7 +871,7 @@ bool AccessibilityManager::IsSelectToSpeakEnabled() const {
return select_to_speak_enabled_; return select_to_speak_enabled_;
} }
void AccessibilityManager::OnSelectToSpeakChanged() { void AccessibilityManager::UpdateSelectToSpeakFromPref() {
if (!profile_) if (!profile_)
return; return;
...@@ -883,10 +882,6 @@ void AccessibilityManager::OnSelectToSpeakChanged() { ...@@ -883,10 +882,6 @@ void AccessibilityManager::OnSelectToSpeakChanged() {
return; return;
select_to_speak_enabled_ = enabled; select_to_speak_enabled_ = enabled;
AccessibilityStatusEventDetails details(ACCESSIBILITY_TOGGLE_SELECT_TO_SPEAK,
enabled, ash::A11Y_NOTIFICATION_NONE);
NotifyAccessibilityStatusChanged(details);
if (enabled) if (enabled)
select_to_speak_loader_->Load(profile_, base::Closure() /* done_cb */); select_to_speak_loader_->Load(profile_, base::Closure() /* done_cb */);
else else
...@@ -1109,7 +1104,7 @@ void AccessibilityManager::SetProfile(Profile* profile) { ...@@ -1109,7 +1104,7 @@ void AccessibilityManager::SetProfile(Profile* profile) {
base::Unretained(this))); base::Unretained(this)));
pref_change_registrar_->Add( pref_change_registrar_->Add(
ash::prefs::kAccessibilitySelectToSpeakEnabled, ash::prefs::kAccessibilitySelectToSpeakEnabled,
base::Bind(&AccessibilityManager::OnSelectToSpeakChanged, base::Bind(&AccessibilityManager::UpdateSelectToSpeakFromPref,
base::Unretained(this))); base::Unretained(this)));
pref_change_registrar_->Add( pref_change_registrar_->Add(
ash::prefs::kAccessibilitySwitchAccessEnabled, ash::prefs::kAccessibilitySwitchAccessEnabled,
...@@ -1162,12 +1157,12 @@ void AccessibilityManager::SetProfile(Profile* profile) { ...@@ -1162,12 +1157,12 @@ void AccessibilityManager::SetProfile(Profile* profile) {
UpdateCursorHighlightFromPref(); UpdateCursorHighlightFromPref();
UpdateFocusHighlightFromPref(); UpdateFocusHighlightFromPref();
UpdateTapDraggingFromPref(); UpdateTapDraggingFromPref();
UpdateSelectToSpeakFromPref();
UpdateSwitchAccessFromPref(); UpdateSwitchAccessFromPref();
// TODO(warx): reconcile to ash once the prefs registration above is moved to // TODO(warx): reconcile to ash once the prefs registration above is moved to
// ash. // ash.
OnSpokenFeedbackChanged(); OnSpokenFeedbackChanged();
OnSelectToSpeakChanged();
// Update the panel height in the shelf layout manager when the profile // Update the panel height in the shelf layout manager when the profile
// changes, since the shelf layout manager doesn't exist in the login profile. // changes, since the shelf layout manager doesn't exist in the login profile.
...@@ -1209,8 +1204,7 @@ void AccessibilityManager::NotifyAccessibilityStatusChanged( ...@@ -1209,8 +1204,7 @@ void AccessibilityManager::NotifyAccessibilityStatusChanged(
details.notification_type != ACCESSIBILITY_TOGGLE_HIGH_CONTRAST_MODE && details.notification_type != ACCESSIBILITY_TOGGLE_HIGH_CONTRAST_MODE &&
details.notification_type != ACCESSIBILITY_TOGGLE_LARGE_CURSOR && details.notification_type != ACCESSIBILITY_TOGGLE_LARGE_CURSOR &&
details.notification_type != ACCESSIBILITY_TOGGLE_MONO_AUDIO && details.notification_type != ACCESSIBILITY_TOGGLE_MONO_AUDIO &&
details.notification_type != ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK && details.notification_type != ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK) {
details.notification_type != ACCESSIBILITY_TOGGLE_SELECT_TO_SPEAK) {
ash::Shell::Get()->system_tray_notifier()->NotifyAccessibilityStatusChanged( ash::Shell::Get()->system_tray_notifier()->NotifyAccessibilityStatusChanged(
details.notify); details.notify);
} }
......
...@@ -48,7 +48,6 @@ enum AccessibilityNotificationType { ...@@ -48,7 +48,6 @@ enum AccessibilityNotificationType {
ACCESSIBILITY_TOGGLE_STICKY_KEYS, ACCESSIBILITY_TOGGLE_STICKY_KEYS,
ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER, ACCESSIBILITY_TOGGLE_SCREEN_MAGNIFIER,
ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK, ACCESSIBILITY_TOGGLE_SPOKEN_FEEDBACK,
ACCESSIBILITY_TOGGLE_SELECT_TO_SPEAK,
ACCESSIBILITY_TOGGLE_VIRTUAL_KEYBOARD, ACCESSIBILITY_TOGGLE_VIRTUAL_KEYBOARD,
ACCESSIBILITY_TOGGLE_MONO_AUDIO, ACCESSIBILITY_TOGGLE_MONO_AUDIO,
ACCESSIBILITY_TOGGLE_CARET_HIGHLIGHT, ACCESSIBILITY_TOGGLE_CARET_HIGHLIGHT,
...@@ -321,7 +320,7 @@ class AccessibilityManager ...@@ -321,7 +320,7 @@ class AccessibilityManager
void UpdateCursorHighlightFromPref(); void UpdateCursorHighlightFromPref();
void UpdateFocusHighlightFromPref(); void UpdateFocusHighlightFromPref();
void UpdateTapDraggingFromPref(); void UpdateTapDraggingFromPref();
void OnSelectToSpeakChanged(); void UpdateSelectToSpeakFromPref();
void UpdateSwitchAccessFromPref(); void UpdateSwitchAccessFromPref();
void UpdateAccessibilityHighlightingFromPrefs(); void UpdateAccessibilityHighlightingFromPrefs();
......
...@@ -237,7 +237,7 @@ void Preferences::RegisterProfilePrefs( ...@@ -237,7 +237,7 @@ void Preferences::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterBooleanPref( registry->RegisterBooleanPref(
ash::prefs::kAccessibilitySelectToSpeakEnabled, false, ash::prefs::kAccessibilitySelectToSpeakEnabled, false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF | PrefRegistry::PUBLIC); user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterBooleanPref( registry->RegisterBooleanPref(
ash::prefs::kAccessibilitySwitchAccessEnabled, false, ash::prefs::kAccessibilitySwitchAccessEnabled, false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
......
...@@ -6,11 +6,9 @@ ...@@ -6,11 +6,9 @@
#include <stddef.h> #include <stddef.h>
#include "ash/public/cpp/config.h"
#include "base/memory/singleton.h" #include "base/memory/singleton.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/ash_config.h"
#include "chrome/browser/extensions/api/automation_internal/automation_event_router.h" #include "chrome/browser/extensions/api/automation_internal/automation_event_router.h"
#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/profiles/profiles_state.h" #include "chrome/browser/profiles/profiles_state.h"
...@@ -89,13 +87,11 @@ void AutomationManagerAura::Enable(BrowserContext* context) { ...@@ -89,13 +87,11 @@ void AutomationManagerAura::Enable(BrowserContext* context) {
views::AXAuraObjCache::GetInstance()->SetDelegate(this); views::AXAuraObjCache::GetInstance()->SetDelegate(this);
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
if (chromeos::GetAshConfig() != ash::Config::MASH) { aura::Window* active_window = ash::wm::GetActiveWindow();
aura::Window* active_window = ash::wm::GetActiveWindow(); if (active_window) {
if (active_window) { views::AXAuraObjWrapper* focus =
views::AXAuraObjWrapper* focus = views::AXAuraObjCache::GetInstance()->GetOrCreate(active_window);
views::AXAuraObjCache::GetInstance()->GetOrCreate(active_window); SendEvent(context, focus, ax::mojom::Event::kChildrenChanged);
SendEvent(context, focus, ax::mojom::Event::kChildrenChanged);
}
} }
#endif #endif
} }
......
...@@ -18193,20 +18193,6 @@ should be able to be added at any place in this file. ...@@ -18193,20 +18193,6 @@ should be able to be added at any place in this file.
</description> </description>
</action> </action>
<action name="StatusArea_SelectToSpeakDisabled">
<owner>katie@chromium.org</owner>
<description>
Ash system menu: Accessibility: Disable Select-to-Speak.
</description>
</action>
<action name="StatusArea_SelectToSpeakEnabled">
<owner>katie@chromium.org</owner>
<description>
Ash system menu: Accessibility: Enable Select-to-Speak.
</description>
</action>
<action name="StatusArea_SignOut"> <action name="StatusArea_SignOut">
<owner>Please list the metric's owners. Add more owner tags as needed.</owner> <owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<description>Please enter the description of this user action.</description> <description>Please enter the description of this user action.</description>
......
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