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_ACCESSIBILITY_DELEGATE_H_ | 5 #ifndef ASH_ACCESSIBILITY_DELEGATE_H_ |
6 #define ASH_ACCESSIBILITY_DELEGATE_H_ | 6 #define ASH_ACCESSIBILITY_DELEGATE_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/magnifier/magnifier_constants.h" | |
10 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "ui/chromeos/accessibility_types.h" |
11 | 11 |
12 namespace ash { | 12 namespace ash { |
13 | 13 |
14 enum AccessibilityNotificationVisibility { | |
15 A11Y_NOTIFICATION_NONE, | |
16 A11Y_NOTIFICATION_SHOW, | |
17 }; | |
18 | |
19 enum AccessibilityAlert { | |
20 A11Y_ALERT_NONE, | |
21 A11Y_ALERT_WINDOW_NEEDED, | |
22 A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED | |
23 }; | |
24 | |
25 // A delegate class to control and query accessibility features. | 14 // A delegate class to control and query accessibility features. |
26 class ASH_EXPORT AccessibilityDelegate { | 15 class ASH_EXPORT AccessibilityDelegate { |
27 public: | 16 public: |
28 virtual ~AccessibilityDelegate() {} | 17 virtual ~AccessibilityDelegate() {} |
29 | 18 |
30 // Invoked to toggle spoken feedback for accessibility | 19 // Invoked to toggle spoken feedback for accessibility |
31 virtual void ToggleSpokenFeedback( | 20 virtual void ToggleSpokenFeedback( |
32 AccessibilityNotificationVisibility notify) = 0; | 21 ui::AccessibilityNotificationVisibility notify) = 0; |
33 | 22 |
34 // Returns true if spoken feedback is enabled. | 23 // Returns true if spoken feedback is enabled. |
35 virtual bool IsSpokenFeedbackEnabled() const = 0; | 24 virtual bool IsSpokenFeedbackEnabled() const = 0; |
36 | 25 |
37 // Invoked to toggle high contrast mode for accessibility. | 26 // Invoked to toggle high contrast mode for accessibility. |
38 virtual void ToggleHighContrast() = 0; | 27 virtual void ToggleHighContrast() = 0; |
39 | 28 |
40 // Returns true if high contrast mode is enabled. | 29 // Returns true if high contrast mode is enabled. |
41 virtual bool IsHighContrastEnabled() const = 0; | 30 virtual bool IsHighContrastEnabled() const = 0; |
42 | 31 |
43 // Invoked to enable the screen magnifier. | 32 // Invoked to enable the screen magnifier. |
44 virtual void SetMagnifierEnabled(bool enabled) = 0; | 33 virtual void SetMagnifierEnabled(bool enabled) = 0; |
45 | 34 |
46 // Invoked to change the type of the screen magnifier. | 35 // Invoked to change the type of the screen magnifier. |
47 virtual void SetMagnifierType(MagnifierType type) = 0; | 36 virtual void SetMagnifierType(ui::MagnifierType type) = 0; |
48 | 37 |
49 // Returns true if the screen magnifier is enabled. | 38 // Returns true if the screen magnifier is enabled. |
50 virtual bool IsMagnifierEnabled() const = 0; | 39 virtual bool IsMagnifierEnabled() const = 0; |
51 | 40 |
52 // Returns the current screen magnifier mode. | 41 // Returns the current screen magnifier mode. |
53 virtual MagnifierType GetMagnifierType() const = 0; | 42 virtual ui::MagnifierType GetMagnifierType() const = 0; |
54 | 43 |
55 // Invoked to enable Large Cursor. | 44 // Invoked to enable Large Cursor. |
56 virtual void SetLargeCursorEnabled(bool enabled) = 0; | 45 virtual void SetLargeCursorEnabled(bool enabled) = 0; |
57 | 46 |
58 // Returns ture if Large Cursor is enabled. | 47 // Returns ture if Large Cursor is enabled. |
59 virtual bool IsLargeCursorEnabled() const = 0; | 48 virtual bool IsLargeCursorEnabled() const = 0; |
60 | 49 |
61 // Invoked to enable autoclick. | 50 // Invoked to enable autoclick. |
62 virtual void SetAutoclickEnabled(bool enabled) = 0; | 51 virtual void SetAutoclickEnabled(bool enabled) = 0; |
63 | 52 |
(...skipping 16 matching lines...) Expand all Loading... |
80 virtual void SilenceSpokenFeedback() const = 0; | 69 virtual void SilenceSpokenFeedback() const = 0; |
81 | 70 |
82 // Saves the zoom scale of the full screen magnifier. | 71 // Saves the zoom scale of the full screen magnifier. |
83 virtual void SaveScreenMagnifierScale(double scale) = 0; | 72 virtual void SaveScreenMagnifierScale(double scale) = 0; |
84 | 73 |
85 // Gets a saved value of the zoom scale of full screen magnifier. If a value | 74 // Gets a saved value of the zoom scale of full screen magnifier. If a value |
86 // is not saved, return a negative value. | 75 // is not saved, return a negative value. |
87 virtual double GetSavedScreenMagnifierScale() = 0; | 76 virtual double GetSavedScreenMagnifierScale() = 0; |
88 | 77 |
89 // Triggers an accessibility alert to give the user feedback. | 78 // Triggers an accessibility alert to give the user feedback. |
90 virtual void TriggerAccessibilityAlert(AccessibilityAlert alert) = 0; | 79 virtual void TriggerAccessibilityAlert(ui::AccessibilityAlert alert) = 0; |
91 | 80 |
92 // Gets the last accessibility alert that was triggered. | 81 // Gets the last accessibility alert that was triggered. |
93 virtual AccessibilityAlert GetLastAccessibilityAlert() = 0; | 82 virtual ui::AccessibilityAlert GetLastAccessibilityAlert() = 0; |
94 | 83 |
95 // Plays an earcon. Earcons are brief and distinctive sounds that indicate | 84 // Plays an earcon. Earcons are brief and distinctive sounds that indicate |
96 // when their mapped event has occurred. The sound key enums can be found in | 85 // when their mapped event has occurred. The sound key enums can be found in |
97 // chromeos/audio/chromeos_sounds.h. | 86 // chromeos/audio/chromeos_sounds.h. |
98 virtual void PlayEarcon(int sound_key) = 0; | 87 virtual void PlayEarcon(int sound_key) = 0; |
99 | 88 |
100 // Initiates play of shutdown sound and returns it's duration. | 89 // Initiates play of shutdown sound and returns it's duration. |
101 virtual base::TimeDelta PlayShutdownSound() const = 0; | 90 virtual base::TimeDelta PlayShutdownSound() const = 0; |
102 }; | 91 }; |
103 | 92 |
104 } // namespace ash | 93 } // namespace ash |
105 | 94 |
106 #endif // ASH_ACCESSIBILITY_DELEGATE_H_ | 95 #endif // ASH_ACCESSIBILITY_DELEGATE_H_ |
OLD | NEW |