| 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_ACCESSIBILITY_DELEGATE_H_ | 5 #ifndef ASH_COMMON_ACCESSIBILITY_DELEGATE_H_ |
| 6 #define ASH_COMMON_ACCESSIBILITY_DELEGATE_H_ | 6 #define ASH_COMMON_ACCESSIBILITY_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/common/accessibility_types.h" | 9 #include "ash/common/accessibility_types.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "ui/accessibility/ax_enums.h" | 11 #include "ui/accessibility/ax_enums.h" |
| 12 | 12 |
| 13 namespace ash { | 13 namespace ash { |
| 14 | 14 |
| 15 // A delegate class to control and query accessibility features. | 15 // A delegate class to control and query accessibility features. |
| 16 class ASH_EXPORT AccessibilityDelegate { | 16 class ASH_EXPORT AccessibilityDelegate { |
| 17 public: | 17 public: |
| 18 virtual ~AccessibilityDelegate() {} | 18 virtual ~AccessibilityDelegate() {} |
| 19 | 19 |
| 20 // Invoked to toggle spoken feedback for accessibility | 20 // Invoked to toggle spoken feedback for accessibility |
| 21 virtual void ToggleSpokenFeedback( | 21 virtual void ToggleSpokenFeedback( |
| 22 ui::AccessibilityNotificationVisibility notify) = 0; | 22 AccessibilityNotificationVisibility notify) = 0; |
| 23 | 23 |
| 24 // Returns true if spoken feedback is enabled. | 24 // Returns true if spoken feedback is enabled. |
| 25 virtual bool IsSpokenFeedbackEnabled() const = 0; | 25 virtual bool IsSpokenFeedbackEnabled() const = 0; |
| 26 | 26 |
| 27 // Invoked to toggle high contrast mode for accessibility. | 27 // Invoked to toggle high contrast mode for accessibility. |
| 28 virtual void ToggleHighContrast() = 0; | 28 virtual void ToggleHighContrast() = 0; |
| 29 | 29 |
| 30 // Returns true if high contrast mode is enabled. | 30 // Returns true if high contrast mode is enabled. |
| 31 virtual bool IsHighContrastEnabled() const = 0; | 31 virtual bool IsHighContrastEnabled() const = 0; |
| 32 | 32 |
| 33 // Invoked to enable the screen magnifier. | 33 // Invoked to enable the screen magnifier. |
| 34 virtual void SetMagnifierEnabled(bool enabled) = 0; | 34 virtual void SetMagnifierEnabled(bool enabled) = 0; |
| 35 | 35 |
| 36 // Invoked to change the type of the screen magnifier. | 36 // Invoked to change the type of the screen magnifier. |
| 37 virtual void SetMagnifierType(ui::MagnifierType type) = 0; | 37 virtual void SetMagnifierType(MagnifierType type) = 0; |
| 38 | 38 |
| 39 // Returns true if the screen magnifier is enabled. | 39 // Returns true if the screen magnifier is enabled. |
| 40 virtual bool IsMagnifierEnabled() const = 0; | 40 virtual bool IsMagnifierEnabled() const = 0; |
| 41 | 41 |
| 42 // Returns the current screen magnifier mode. | 42 // Returns the current screen magnifier mode. |
| 43 virtual ui::MagnifierType GetMagnifierType() const = 0; | 43 virtual MagnifierType GetMagnifierType() const = 0; |
| 44 | 44 |
| 45 // Invoked to enable Large Cursor. | 45 // Invoked to enable Large Cursor. |
| 46 virtual void SetLargeCursorEnabled(bool enabled) = 0; | 46 virtual void SetLargeCursorEnabled(bool enabled) = 0; |
| 47 | 47 |
| 48 // Returns true if Large Cursor is enabled. | 48 // Returns true if Large Cursor is enabled. |
| 49 virtual bool IsLargeCursorEnabled() const = 0; | 49 virtual bool IsLargeCursorEnabled() const = 0; |
| 50 | 50 |
| 51 // Invoked to enable autoclick. | 51 // Invoked to enable autoclick. |
| 52 virtual void SetAutoclickEnabled(bool enabled) = 0; | 52 virtual void SetAutoclickEnabled(bool enabled) = 0; |
| 53 | 53 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 virtual void SilenceSpokenFeedback() const = 0; | 106 virtual void SilenceSpokenFeedback() const = 0; |
| 107 | 107 |
| 108 // Saves the zoom scale of the full screen magnifier. | 108 // Saves the zoom scale of the full screen magnifier. |
| 109 virtual void SaveScreenMagnifierScale(double scale) = 0; | 109 virtual void SaveScreenMagnifierScale(double scale) = 0; |
| 110 | 110 |
| 111 // Gets a saved value of the zoom scale of full screen magnifier. If a value | 111 // Gets a saved value of the zoom scale of full screen magnifier. If a value |
| 112 // is not saved, return a negative value. | 112 // is not saved, return a negative value. |
| 113 virtual double GetSavedScreenMagnifierScale() = 0; | 113 virtual double GetSavedScreenMagnifierScale() = 0; |
| 114 | 114 |
| 115 // Triggers an accessibility alert to give the user feedback. | 115 // Triggers an accessibility alert to give the user feedback. |
| 116 virtual void TriggerAccessibilityAlert(ui::AccessibilityAlert alert) = 0; | 116 virtual void TriggerAccessibilityAlert(AccessibilityAlert alert) = 0; |
| 117 | 117 |
| 118 // Gets the last accessibility alert that was triggered. | 118 // Gets the last accessibility alert that was triggered. |
| 119 virtual ui::AccessibilityAlert GetLastAccessibilityAlert() = 0; | 119 virtual AccessibilityAlert GetLastAccessibilityAlert() = 0; |
| 120 | 120 |
| 121 // Plays an earcon. Earcons are brief and distinctive sounds that indicate | 121 // Plays an earcon. Earcons are brief and distinctive sounds that indicate |
| 122 // when their mapped event has occurred. The sound key enums can be found in | 122 // when their mapped event has occurred. The sound key enums can be found in |
| 123 // chromeos/audio/chromeos_sounds.h. | 123 // chromeos/audio/chromeos_sounds.h. |
| 124 virtual void PlayEarcon(int sound_key) = 0; | 124 virtual void PlayEarcon(int sound_key) = 0; |
| 125 | 125 |
| 126 // Initiates play of shutdown sound and returns it's duration. | 126 // Initiates play of shutdown sound and returns it's duration. |
| 127 virtual base::TimeDelta PlayShutdownSound() const = 0; | 127 virtual base::TimeDelta PlayShutdownSound() const = 0; |
| 128 | 128 |
| 129 // Forward an accessibility gesture from the touch exploration controller to | 129 // Forward an accessibility gesture from the touch exploration controller to |
| 130 // ChromeVox. | 130 // ChromeVox. |
| 131 virtual void HandleAccessibilityGesture(ui::AXGesture gesture) = 0; | 131 virtual void HandleAccessibilityGesture(ui::AXGesture gesture) = 0; |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 } // namespace ash | 134 } // namespace ash |
| 135 | 135 |
| 136 #endif // ASH_COMMON_ACCESSIBILITY_DELEGATE_H_ | 136 #endif // ASH_COMMON_ACCESSIBILITY_DELEGATE_H_ |
| OLD | NEW |