Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(808)

Side by Side Diff: ash/accessibility_delegate.h

Issue 2048443002: ABANDONED: mash: Move shell delegate interfaces to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moveshelfmodel
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_ACCESSIBILITY_DELEGATE_H_
6 #define ASH_ACCESSIBILITY_DELEGATE_H_
7
8 #include "ash/ash_export.h"
9 #include "base/time/time.h"
10 #include "ui/accessibility/ax_enums.h"
11 #include "ui/chromeos/accessibility_types.h"
12
13 namespace ash {
14
15 // A delegate class to control and query accessibility features.
16 class ASH_EXPORT AccessibilityDelegate {
17 public:
18 virtual ~AccessibilityDelegate() {}
19
20 // Invoked to toggle spoken feedback for accessibility
21 virtual void ToggleSpokenFeedback(
22 ui::AccessibilityNotificationVisibility notify) = 0;
23
24 // Returns true if spoken feedback is enabled.
25 virtual bool IsSpokenFeedbackEnabled() const = 0;
26
27 // Invoked to toggle high contrast mode for accessibility.
28 virtual void ToggleHighContrast() = 0;
29
30 // Returns true if high contrast mode is enabled.
31 virtual bool IsHighContrastEnabled() const = 0;
32
33 // Invoked to enable the screen magnifier.
34 virtual void SetMagnifierEnabled(bool enabled) = 0;
35
36 // Invoked to change the type of the screen magnifier.
37 virtual void SetMagnifierType(ui::MagnifierType type) = 0;
38
39 // Returns true if the screen magnifier is enabled.
40 virtual bool IsMagnifierEnabled() const = 0;
41
42 // Returns the current screen magnifier mode.
43 virtual ui::MagnifierType GetMagnifierType() const = 0;
44
45 // Invoked to enable Large Cursor.
46 virtual void SetLargeCursorEnabled(bool enabled) = 0;
47
48 // Returns true if Large Cursor is enabled.
49 virtual bool IsLargeCursorEnabled() const = 0;
50
51 // Invoked to enable autoclick.
52 virtual void SetAutoclickEnabled(bool enabled) = 0;
53
54 // Returns if autoclick is enabled or not.
55 virtual bool IsAutoclickEnabled() const = 0;
56
57 // Invoked to enable or disable the a11y on-screen keyboard.
58 virtual void SetVirtualKeyboardEnabled(bool enabled) = 0;
59
60 // Returns if the a11y virtual keyboard is enabled.
61 virtual bool IsVirtualKeyboardEnabled() const = 0;
62
63 // Invoked to enable or disable the mono audio output.
64 virtual void SetMonoAudioEnabled(bool enabled) = 0;
65
66 // Returns if the mono audio output is enabled.
67 virtual bool IsMonoAudioEnabled() const = 0;
68
69 // Invoked to enable or disable caret highlighting.
70 virtual void SetCaretHighlightEnabled(bool enabled) = 0;
71
72 // Returns if caret highlighting is enabled.
73 virtual bool IsCaretHighlightEnabled() const = 0;
74
75 // Invoked to enable or disable cursor highlighting.
76 virtual void SetCursorHighlightEnabled(bool enabled) = 0;
77
78 // Returns if cursor highlighting is enabled.
79 virtual bool IsCursorHighlightEnabled() const = 0;
80
81 // Invoked to enable or disable focus highlighting.
82 virtual void SetFocusHighlightEnabled(bool enabled) = 0;
83
84 // Returns if focus highlighting is enabled.
85 virtual bool IsFocusHighlightEnabled() const = 0;
86
87 // Invoked to enable or disable select-to-speak.
88 virtual void SetSelectToSpeakEnabled(bool enabled) = 0;
89
90 // Returns if select-to-speak is enabled.
91 virtual bool IsSelectToSpeakEnabled() const = 0;
92
93 // Invoked to enable or disable switch access.
94 virtual void SetSwitchAccessEnabled(bool enabled) = 0;
95
96 // Returns if switch access is enabled.
97 virtual bool IsSwitchAccessEnabled() const = 0;
98
99 // Returns true when the accessibility menu should be shown.
100 virtual bool ShouldShowAccessibilityMenu() const = 0;
101
102 // Returns true if a braille display is connected to the system.
103 virtual bool IsBrailleDisplayConnected() const = 0;
104
105 // Cancel all current and queued speech immediately.
106 virtual void SilenceSpokenFeedback() const = 0;
107
108 // Saves the zoom scale of the full screen magnifier.
109 virtual void SaveScreenMagnifierScale(double scale) = 0;
110
111 // Gets a saved value of the zoom scale of full screen magnifier. If a value
112 // is not saved, return a negative value.
113 virtual double GetSavedScreenMagnifierScale() = 0;
114
115 // Triggers an accessibility alert to give the user feedback.
116 virtual void TriggerAccessibilityAlert(ui::AccessibilityAlert alert) = 0;
117
118 // Gets the last accessibility alert that was triggered.
119 virtual ui::AccessibilityAlert GetLastAccessibilityAlert() = 0;
120
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
123 // chromeos/audio/chromeos_sounds.h.
124 virtual void PlayEarcon(int sound_key) = 0;
125
126 // Initiates play of shutdown sound and returns it's duration.
127 virtual base::TimeDelta PlayShutdownSound() const = 0;
128
129 // Forward an accessibility gesture from the touch exploration controller to
130 // ChromeVox.
131 virtual void HandleAccessibilityGesture(ui::AXGesture gesture) = 0;
132 };
133
134 } // namespace ash
135
136 #endif // ASH_ACCESSIBILITY_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698