| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_COMMON_DEFAULT_ACCESSIBILITY_DELEGATE_H_ | 5 #ifndef ASH_COMMON_DEFAULT_ACCESSIBILITY_DELEGATE_H_ |
| 6 #define ASH_COMMON_DEFAULT_ACCESSIBILITY_DELEGATE_H_ | 6 #define ASH_COMMON_DEFAULT_ACCESSIBILITY_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/common/accessibility_delegate.h" | 9 #include "ash/common/accessibility_delegate.h" |
| 10 #include "ash/common/accessibility_types.h" |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 | 12 |
| 12 namespace ash { | 13 namespace ash { |
| 13 | 14 |
| 14 class ASH_EXPORT DefaultAccessibilityDelegate : public AccessibilityDelegate { | 15 class ASH_EXPORT DefaultAccessibilityDelegate : public AccessibilityDelegate { |
| 15 public: | 16 public: |
| 16 DefaultAccessibilityDelegate(); | 17 DefaultAccessibilityDelegate(); |
| 17 ~DefaultAccessibilityDelegate() override; | 18 ~DefaultAccessibilityDelegate() override; |
| 18 | 19 |
| 19 bool IsSpokenFeedbackEnabled() const override; | 20 bool IsSpokenFeedbackEnabled() const override; |
| 20 void ToggleHighContrast() override; | 21 void ToggleHighContrast() override; |
| 21 bool IsHighContrastEnabled() const override; | 22 bool IsHighContrastEnabled() const override; |
| 22 void SetMagnifierEnabled(bool enabled) override; | 23 void SetMagnifierEnabled(bool enabled) override; |
| 23 void SetMagnifierType(ui::MagnifierType type) override; | 24 void SetMagnifierType(MagnifierType type) override; |
| 24 bool IsMagnifierEnabled() const override; | 25 bool IsMagnifierEnabled() const override; |
| 25 ui::MagnifierType GetMagnifierType() const override; | 26 MagnifierType GetMagnifierType() const override; |
| 26 void SetLargeCursorEnabled(bool enabled) override; | 27 void SetLargeCursorEnabled(bool enabled) override; |
| 27 bool IsLargeCursorEnabled() const override; | 28 bool IsLargeCursorEnabled() const override; |
| 28 void SetAutoclickEnabled(bool enabled) override; | 29 void SetAutoclickEnabled(bool enabled) override; |
| 29 bool IsAutoclickEnabled() const override; | 30 bool IsAutoclickEnabled() const override; |
| 30 void SetVirtualKeyboardEnabled(bool enabled) override; | 31 void SetVirtualKeyboardEnabled(bool enabled) override; |
| 31 bool IsVirtualKeyboardEnabled() const override; | 32 bool IsVirtualKeyboardEnabled() const override; |
| 32 void SetMonoAudioEnabled(bool enabled) override; | 33 void SetMonoAudioEnabled(bool enabled) override; |
| 33 bool IsMonoAudioEnabled() const override; | 34 bool IsMonoAudioEnabled() const override; |
| 34 void SetCaretHighlightEnabled(bool enabled) override; | 35 void SetCaretHighlightEnabled(bool enabled) override; |
| 35 bool IsCaretHighlightEnabled() const override; | 36 bool IsCaretHighlightEnabled() const override; |
| 36 void SetCursorHighlightEnabled(bool enabled) override; | 37 void SetCursorHighlightEnabled(bool enabled) override; |
| 37 bool IsCursorHighlightEnabled() const override; | 38 bool IsCursorHighlightEnabled() const override; |
| 38 void SetFocusHighlightEnabled(bool enabled) override; | 39 void SetFocusHighlightEnabled(bool enabled) override; |
| 39 bool IsFocusHighlightEnabled() const override; | 40 bool IsFocusHighlightEnabled() const override; |
| 40 void SetSelectToSpeakEnabled(bool enabled) override; | 41 void SetSelectToSpeakEnabled(bool enabled) override; |
| 41 bool IsSelectToSpeakEnabled() const override; | 42 bool IsSelectToSpeakEnabled() const override; |
| 42 void SetSwitchAccessEnabled(bool enabled) override; | 43 void SetSwitchAccessEnabled(bool enabled) override; |
| 43 bool IsSwitchAccessEnabled() const override; | 44 bool IsSwitchAccessEnabled() const override; |
| 44 bool ShouldShowAccessibilityMenu() const override; | 45 bool ShouldShowAccessibilityMenu() const override; |
| 45 bool IsBrailleDisplayConnected() const override; | 46 bool IsBrailleDisplayConnected() const override; |
| 46 void SilenceSpokenFeedback() const override; | 47 void SilenceSpokenFeedback() const override; |
| 47 void ToggleSpokenFeedback( | 48 void ToggleSpokenFeedback( |
| 48 ui::AccessibilityNotificationVisibility notify) override; | 49 AccessibilityNotificationVisibility notify) override; |
| 49 void SaveScreenMagnifierScale(double scale) override; | 50 void SaveScreenMagnifierScale(double scale) override; |
| 50 double GetSavedScreenMagnifierScale() override; | 51 double GetSavedScreenMagnifierScale() override; |
| 51 void TriggerAccessibilityAlert(ui::AccessibilityAlert alert) override; | 52 void TriggerAccessibilityAlert(AccessibilityAlert alert) override; |
| 52 ui::AccessibilityAlert GetLastAccessibilityAlert() override; | 53 AccessibilityAlert GetLastAccessibilityAlert() override; |
| 53 void PlayEarcon(int sound_key) override; | 54 void PlayEarcon(int sound_key) override; |
| 54 base::TimeDelta PlayShutdownSound() const override; | 55 base::TimeDelta PlayShutdownSound() const override; |
| 55 void HandleAccessibilityGesture(ui::AXGesture gesture) override; | 56 void HandleAccessibilityGesture(ui::AXGesture gesture) override; |
| 56 | 57 |
| 57 private: | 58 private: |
| 58 bool spoken_feedback_enabled_ = false; | 59 bool spoken_feedback_enabled_ = false; |
| 59 bool high_contrast_enabled_ = false; | 60 bool high_contrast_enabled_ = false; |
| 60 bool screen_magnifier_enabled_ = false; | 61 bool screen_magnifier_enabled_ = false; |
| 61 ui::MagnifierType screen_magnifier_type_ = ui::kDefaultMagnifierType; | 62 MagnifierType screen_magnifier_type_ = kDefaultMagnifierType; |
| 62 bool large_cursor_enabled_ = false; | 63 bool large_cursor_enabled_ = false; |
| 63 bool autoclick_enabled_ = false; | 64 bool autoclick_enabled_ = false; |
| 64 bool virtual_keyboard_enabled_ = false; | 65 bool virtual_keyboard_enabled_ = false; |
| 65 bool mono_audio_enabled_ = false; | 66 bool mono_audio_enabled_ = false; |
| 66 bool caret_highlight_enabled_ = false; | 67 bool caret_highlight_enabled_ = false; |
| 67 bool cursor_highlight_enabled_ = false; | 68 bool cursor_highlight_enabled_ = false; |
| 68 bool focus_highligh_enabled_ = false; | 69 bool focus_highligh_enabled_ = false; |
| 69 bool select_to_speak_enabled_ = false; | 70 bool select_to_speak_enabled_ = false; |
| 70 bool switch_access_enabled_ = false; | 71 bool switch_access_enabled_ = false; |
| 71 ui::AccessibilityAlert accessibility_alert_ = ui::A11Y_ALERT_NONE; | 72 AccessibilityAlert accessibility_alert_ = A11Y_ALERT_NONE; |
| 72 DISALLOW_COPY_AND_ASSIGN(DefaultAccessibilityDelegate); | 73 DISALLOW_COPY_AND_ASSIGN(DefaultAccessibilityDelegate); |
| 73 }; | 74 }; |
| 74 | 75 |
| 75 } // namespace ash | 76 } // namespace ash |
| 76 | 77 |
| 77 #endif // ASH_COMMON_DEFAULT_ACCESSIBILITY_DELEGATE_H_ | 78 #endif // ASH_COMMON_DEFAULT_ACCESSIBILITY_DELEGATE_H_ |
| OLD | NEW |