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" | 9 #include "ash/magnifier/magnifier_constants.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 | 11 |
12 namespace ash { | 12 namespace ash { |
13 | 13 |
14 enum AccessibilityNotificationVisibility { | 14 enum AccessibilityNotificationVisibility { |
15 A11Y_NOTIFICATION_NONE, | 15 A11Y_NOTIFICATION_NONE, |
16 A11Y_NOTIFICATION_SHOW, | 16 A11Y_NOTIFICATION_SHOW, |
17 }; | 17 }; |
18 | 18 |
19 enum AccessibilityAlert { | 19 enum AccessibilityAlert { |
20 A11Y_ALERT_NONE, | 20 A11Y_ALERT_NONE, |
21 A11Y_ALERT_WINDOW_NEEDED | 21 A11Y_ALERT_WINDOW_NEEDED |
22 }; | 22 }; |
23 | 23 |
24 // A deletate class to control accessibility features. | 24 // A delegate class to control and query accessibility features. |
25 class ASH_EXPORT AccessibilityDelegate { | 25 class ASH_EXPORT AccessibilityDelegate { |
26 public: | 26 public: |
27 virtual ~AccessibilityDelegate() {} | 27 virtual ~AccessibilityDelegate() {} |
28 | 28 |
29 // Invoked to toggle spoken feedback for accessibility | 29 // Invoked to toggle spoken feedback for accessibility |
30 virtual void ToggleSpokenFeedback( | 30 virtual void ToggleSpokenFeedback( |
31 AccessibilityNotificationVisibility notify) = 0; | 31 AccessibilityNotificationVisibility notify) = 0; |
32 | 32 |
33 // Returns true if spoken feedback is enabled. | 33 // Returns true if spoken feedback is enabled. |
34 virtual bool IsSpokenFeedbackEnabled() const = 0; | 34 virtual bool IsSpokenFeedbackEnabled() const = 0; |
35 | 35 |
36 // Invoked to toggle high contrast mode for accessibility. | 36 // Invoked to toggle high contrast mode for accessibility. |
37 virtual void ToggleHighContrast() = 0; | 37 virtual void ToggleHighContrast() = 0; |
38 | 38 |
39 // Returns true if high contrast mode is enabled. | 39 // Returns true if high contrast mode is enabled. |
40 virtual bool IsHighContrastEnabled() const = 0; | 40 virtual bool IsHighContrastEnabled() const = 0; |
41 | 41 |
42 // Invoked to enable the screen magnifier. | 42 // Invoked to enable the screen magnifier. |
43 virtual void SetMagnifierEnabled(bool enabled) = 0; | 43 virtual void SetMagnifierEnabled(bool enabled) = 0; |
44 | 44 |
45 // Invoked to change the type of the screen magnifier. | 45 // Invoked to change the type of the screen magnifier. |
46 virtual void SetMagnifierType(MagnifierType type) = 0; | 46 virtual void SetMagnifierType(MagnifierType type) = 0; |
47 | 47 |
48 // Returns true if the screen magnifier is enabled or not. | 48 // Returns true if the screen magnifier is enabled. |
49 virtual bool IsMagnifierEnabled() const = 0; | 49 virtual bool IsMagnifierEnabled() const = 0; |
50 | 50 |
51 // Returns the current screen magnifier mode. | 51 // Returns the current screen magnifier mode. |
52 virtual MagnifierType GetMagnifierType() const = 0; | 52 virtual MagnifierType GetMagnifierType() const = 0; |
53 | 53 |
54 // Invoked to enable Large Cursor. | 54 // Invoked to enable Large Cursor. |
55 virtual void SetLargeCursorEnabled(bool enabled) = 0; | 55 virtual void SetLargeCursorEnabled(bool enabled) = 0; |
56 | 56 |
57 // Returns ture if Large Cursor is enabled or not. | 57 // Returns ture if Large Cursor is enabled. |
58 virtual bool IsLargeCursorEnabled() const = 0; | 58 virtual bool IsLargeCursorEnabled() const = 0; |
59 | 59 |
60 // Invoked to enable autoclick. | 60 // Invoked to enable autoclick. |
61 virtual void SetAutoclickEnabled(bool enabled) = 0; | 61 virtual void SetAutoclickEnabled(bool enabled) = 0; |
62 | 62 |
63 // Returns if autoclick is enabled or not. | 63 // Returns if autoclick is enabled or not. |
64 virtual bool IsAutoclickEnabled() const = 0; | 64 virtual bool IsAutoclickEnabled() const = 0; |
65 | 65 |
66 // Invoked to enable or disable the a11y on-screen keyboard. | 66 // Invoked to enable or disable the a11y on-screen keyboard. |
67 virtual void SetVirtualKeyboardEnabled(bool enabled) = 0; | 67 virtual void SetVirtualKeyboardEnabled(bool enabled) = 0; |
68 | 68 |
69 // Returns if the a11y virtual keyboard is enabled. | 69 // Returns if the a11y virtual keyboard is enabled. |
70 virtual bool IsVirtualKeyboardEnabled() const = 0; | 70 virtual bool IsVirtualKeyboardEnabled() const = 0; |
71 | 71 |
72 // Returns true when the accessibility menu should be shown. | 72 // Returns true when the accessibility menu should be shown. |
73 virtual bool ShouldShowAccessibilityMenu() const = 0; | 73 virtual bool ShouldShowAccessibilityMenu() const = 0; |
74 | 74 |
75 // Returns true if a braille display is connected to the system. | |
76 virtual bool IsBrailleDisplayConnected() = 0; | |
oshima
2014/03/26 19:42:54
nit: can this be const?
| |
77 | |
75 // Cancel all current and queued speech immediately. | 78 // Cancel all current and queued speech immediately. |
76 virtual void SilenceSpokenFeedback() const = 0; | 79 virtual void SilenceSpokenFeedback() const = 0; |
77 | 80 |
78 // Saves the zoom scale of the full screen magnifier. | 81 // Saves the zoom scale of the full screen magnifier. |
79 virtual void SaveScreenMagnifierScale(double scale) = 0; | 82 virtual void SaveScreenMagnifierScale(double scale) = 0; |
80 | 83 |
81 // Gets a saved value of the zoom scale of full screen magnifier. If a value | 84 // Gets a saved value of the zoom scale of full screen magnifier. If a value |
82 // is not saved, return a negative value. | 85 // is not saved, return a negative value. |
83 virtual double GetSavedScreenMagnifierScale() = 0; | 86 virtual double GetSavedScreenMagnifierScale() = 0; |
84 | 87 |
85 // Triggers an accessibility alert to give the user feedback. | 88 // Triggers an accessibility alert to give the user feedback. |
86 virtual void TriggerAccessibilityAlert(AccessibilityAlert alert) = 0; | 89 virtual void TriggerAccessibilityAlert(AccessibilityAlert alert) = 0; |
87 | 90 |
88 // Gets the last accessibility alert that was triggered. | 91 // Gets the last accessibility alert that was triggered. |
89 virtual AccessibilityAlert GetLastAccessibilityAlert() = 0; | 92 virtual AccessibilityAlert GetLastAccessibilityAlert() = 0; |
90 | 93 |
91 // Initiates play of shutdown sound and returns it's duration. | 94 // Initiates play of shutdown sound and returns it's duration. |
92 virtual base::TimeDelta PlayShutdownSound() const = 0; | 95 virtual base::TimeDelta PlayShutdownSound() const = 0; |
93 }; | 96 }; |
94 | 97 |
95 } // namespace ash | 98 } // namespace ash |
96 | 99 |
97 #endif // ASH_ACCESSIBILITYDELEGATE_H_ | 100 #endif // ASH_ACCESSIBILITYDELEGATE_H_ |
OLD | NEW |