Commit 2dbd34cb authored by Qiang Xu's avatar Qiang Xu Committed by Commit Bot

cros: remove braille_display_connected_

changes:
Follow up with crrev.com/c/1007891, |braille_display_connected_| is no
longer needed by TrayAccessibility. We don't need it for tray
visibility either, since when connected it always guaranteed that spoken
feedback is enabled, so that spoken feedback enabled state could reflect
on behalf of braille display connected state.

Bug: 800270
Test: covered by tests
Change-Id: I33f0d7b9d53a41e7ff1ed5160207b9d5fb603188
Reviewed-on: https://chromium-review.googlesource.com/1014746
Commit-Queue: Qiang Xu <warx@google.com>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551398}
parent f437cf91
...@@ -505,8 +505,7 @@ void AccessibilityController::BrailleDisplayStateChanged(bool connected) { ...@@ -505,8 +505,7 @@ void AccessibilityController::BrailleDisplayStateChanged(bool connected) {
else if (connected && !spoken_feedback_enabled_) else if (connected && !spoken_feedback_enabled_)
type = A11yNotificationType::kSpokenFeedbackBrailleEnabled; type = A11yNotificationType::kSpokenFeedbackBrailleEnabled;
braille_display_connected_ = connected; if (connected)
if (braille_display_connected_)
SetSpokenFeedbackEnabled(true, A11Y_NOTIFICATION_NONE); SetSpokenFeedbackEnabled(true, A11Y_NOTIFICATION_NONE);
NotifyAccessibilityStatusChanged(); NotifyAccessibilityStatusChanged();
......
...@@ -89,8 +89,6 @@ class ASH_EXPORT AccessibilityController ...@@ -89,8 +89,6 @@ class ASH_EXPORT AccessibilityController
void SetVirtualKeyboardEnabled(bool enabled); void SetVirtualKeyboardEnabled(bool enabled);
bool IsVirtualKeyboardEnabled() const; bool IsVirtualKeyboardEnabled() const;
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.
void TriggerAccessibilityAlert(mojom::AccessibilityAlert alert); void TriggerAccessibilityAlert(mojom::AccessibilityAlert alert);
...@@ -194,7 +192,6 @@ class ASH_EXPORT AccessibilityController ...@@ -194,7 +192,6 @@ class ASH_EXPORT AccessibilityController
bool select_to_speak_enabled_ = false; bool select_to_speak_enabled_ = false;
bool sticky_keys_enabled_ = false; bool sticky_keys_enabled_ = false;
bool virtual_keyboard_enabled_ = false; bool virtual_keyboard_enabled_ = false;
bool braille_display_connected_ = false;
// Used to control the highlights of caret, cursor and focus. // Used to control the highlights of caret, cursor and focus.
std::unique_ptr<AccessibilityHighlightController> std::unique_ptr<AccessibilityHighlightController>
......
...@@ -45,14 +45,13 @@ enum AccessibilityState { ...@@ -45,14 +45,13 @@ enum AccessibilityState {
A11Y_LARGE_CURSOR = 1 << 3, A11Y_LARGE_CURSOR = 1 << 3,
A11Y_AUTOCLICK = 1 << 4, A11Y_AUTOCLICK = 1 << 4,
A11Y_VIRTUAL_KEYBOARD = 1 << 5, A11Y_VIRTUAL_KEYBOARD = 1 << 5,
A11Y_BRAILLE_DISPLAY_CONNECTED = 1 << 6, A11Y_MONO_AUDIO = 1 << 6,
A11Y_MONO_AUDIO = 1 << 7, A11Y_CARET_HIGHLIGHT = 1 << 7,
A11Y_CARET_HIGHLIGHT = 1 << 8, A11Y_HIGHLIGHT_MOUSE_CURSOR = 1 << 8,
A11Y_HIGHLIGHT_MOUSE_CURSOR = 1 << 9, A11Y_HIGHLIGHT_KEYBOARD_FOCUS = 1 << 9,
A11Y_HIGHLIGHT_KEYBOARD_FOCUS = 1 << 10, A11Y_STICKY_KEYS = 1 << 10,
A11Y_STICKY_KEYS = 1 << 11, A11Y_SELECT_TO_SPEAK = 1 << 11,
A11Y_SELECT_TO_SPEAK = 1 << 12, A11Y_DOCKED_MAGNIFIER = 1 << 12,
A11Y_DOCKED_MAGNIFIER = 1 << 13,
}; };
uint32_t GetAccessibilityState() { uint32_t GetAccessibilityState() {
...@@ -72,8 +71,6 @@ uint32_t GetAccessibilityState() { ...@@ -72,8 +71,6 @@ uint32_t GetAccessibilityState() {
state |= A11Y_AUTOCLICK; state |= A11Y_AUTOCLICK;
if (controller->IsVirtualKeyboardEnabled()) if (controller->IsVirtualKeyboardEnabled())
state |= A11Y_VIRTUAL_KEYBOARD; state |= A11Y_VIRTUAL_KEYBOARD;
if (controller->braille_display_connected())
state |= A11Y_BRAILLE_DISPLAY_CONNECTED;
if (controller->IsMonoAudioEnabled()) if (controller->IsMonoAudioEnabled())
state |= A11Y_MONO_AUDIO; state |= A11Y_MONO_AUDIO;
if (controller->IsCaretHighlightEnabled()) if (controller->IsCaretHighlightEnabled())
......
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