Migrate data reduction proxy statistics prefs to profile
[chromium-blink-merge.git] / ash / accessibility_delegate.h
blob410ea7a2590777725322a0a3ce566975a7271b33
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.
5 #ifndef ASH_ACCESSIBILITY_DELEGATE_H_
6 #define ASH_ACCESSIBILITY_DELEGATE_H_
8 #include "ash/ash_export.h"
9 #include "ash/magnifier/magnifier_constants.h"
10 #include "base/time/time.h"
12 namespace ash {
14 enum AccessibilityNotificationVisibility {
15 A11Y_NOTIFICATION_NONE,
16 A11Y_NOTIFICATION_SHOW,
19 enum AccessibilityAlert {
20 A11Y_ALERT_NONE,
21 A11Y_ALERT_WINDOW_NEEDED,
22 A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED
25 // A delegate class to control and query accessibility features.
26 class ASH_EXPORT AccessibilityDelegate {
27 public:
28 virtual ~AccessibilityDelegate() {}
30 // Invoked to toggle spoken feedback for accessibility
31 virtual void ToggleSpokenFeedback(
32 AccessibilityNotificationVisibility notify) = 0;
34 // Returns true if spoken feedback is enabled.
35 virtual bool IsSpokenFeedbackEnabled() const = 0;
37 // Invoked to toggle high contrast mode for accessibility.
38 virtual void ToggleHighContrast() = 0;
40 // Returns true if high contrast mode is enabled.
41 virtual bool IsHighContrastEnabled() const = 0;
43 // Invoked to enable the screen magnifier.
44 virtual void SetMagnifierEnabled(bool enabled) = 0;
46 // Invoked to change the type of the screen magnifier.
47 virtual void SetMagnifierType(MagnifierType type) = 0;
49 // Returns true if the screen magnifier is enabled.
50 virtual bool IsMagnifierEnabled() const = 0;
52 // Returns the current screen magnifier mode.
53 virtual MagnifierType GetMagnifierType() const = 0;
55 // Invoked to enable Large Cursor.
56 virtual void SetLargeCursorEnabled(bool enabled) = 0;
58 // Returns ture if Large Cursor is enabled.
59 virtual bool IsLargeCursorEnabled() const = 0;
61 // Invoked to enable autoclick.
62 virtual void SetAutoclickEnabled(bool enabled) = 0;
64 // Returns if autoclick is enabled or not.
65 virtual bool IsAutoclickEnabled() const = 0;
67 // Invoked to enable or disable the a11y on-screen keyboard.
68 virtual void SetVirtualKeyboardEnabled(bool enabled) = 0;
70 // Returns if the a11y virtual keyboard is enabled.
71 virtual bool IsVirtualKeyboardEnabled() const = 0;
73 // Returns true when the accessibility menu should be shown.
74 virtual bool ShouldShowAccessibilityMenu() const = 0;
76 // Returns true if a braille display is connected to the system.
77 virtual bool IsBrailleDisplayConnected() const = 0;
79 // Cancel all current and queued speech immediately.
80 virtual void SilenceSpokenFeedback() const = 0;
82 // Saves the zoom scale of the full screen magnifier.
83 virtual void SaveScreenMagnifierScale(double scale) = 0;
85 // Gets a saved value of the zoom scale of full screen magnifier. If a value
86 // is not saved, return a negative value.
87 virtual double GetSavedScreenMagnifierScale() = 0;
89 // Triggers an accessibility alert to give the user feedback.
90 virtual void TriggerAccessibilityAlert(AccessibilityAlert alert) = 0;
92 // Gets the last accessibility alert that was triggered.
93 virtual AccessibilityAlert GetLastAccessibilityAlert() = 0;
95 // 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
97 // chromeos/audio/chromeos_sounds.h.
98 virtual void PlayEarcon(int sound_key) = 0;
100 // Initiates play of shutdown sound and returns it's duration.
101 virtual base::TimeDelta PlayShutdownSound() const = 0;
104 } // namespace ash
106 #endif // ASH_ACCESSIBILITY_DELEGATE_H_