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"
14 enum AccessibilityNotificationVisibility
{
15 A11Y_NOTIFICATION_NONE
,
16 A11Y_NOTIFICATION_SHOW
,
19 enum AccessibilityAlert
{
21 A11Y_ALERT_WINDOW_NEEDED
24 // A deletate class to control accessibility features.
25 class ASH_EXPORT AccessibilityDelegate
{
27 virtual ~AccessibilityDelegate() {}
29 // Invoked to toggle spoken feedback for accessibility
30 virtual void ToggleSpokenFeedback(
31 AccessibilityNotificationVisibility notify
) = 0;
33 // Returns true if spoken feedback is enabled.
34 virtual bool IsSpokenFeedbackEnabled() const = 0;
36 // Invoked to toggle high contrast mode for accessibility.
37 virtual void ToggleHighContrast() = 0;
39 // Returns true if high contrast mode is enabled.
40 virtual bool IsHighContrastEnabled() const = 0;
42 // Invoked to enable the screen magnifier.
43 virtual void SetMagnifierEnabled(bool enabled
) = 0;
45 // Invoked to change the type of the screen magnifier.
46 virtual void SetMagnifierType(MagnifierType type
) = 0;
48 // Returns true if the screen magnifier is enabled or not.
49 virtual bool IsMagnifierEnabled() const = 0;
51 // Returns the current screen magnifier mode.
52 virtual MagnifierType
GetMagnifierType() const = 0;
54 // Invoked to enable Large Cursor.
55 virtual void SetLargeCursorEnabled(bool enabled
) = 0;
57 // Returns ture if Large Cursor is enabled or not.
58 virtual bool IsLargeCursorEnabled() const = 0;
60 // Invoked to enable autoclick.
61 virtual void SetAutoclickEnabled(bool enabled
) = 0;
63 // Returns if autoclick is enabled or not.
64 virtual bool IsAutoclickEnabled() const = 0;
66 // Invoked to enable or disable the a11y on-screen keyboard.
67 virtual void SetVirtualKeyboardEnabled(bool enabled
) = 0;
69 // Returns if the a11y virtual keyboard is enabled.
70 virtual bool IsVirtualKeyboardEnabled() const = 0;
72 // Returns true when the accessibility menu should be shown.
73 virtual bool ShouldShowAccessibilityMenu() const = 0;
75 // Cancel all current and queued speech immediately.
76 virtual void SilenceSpokenFeedback() const = 0;
78 // Saves the zoom scale of the full screen magnifier.
79 virtual void SaveScreenMagnifierScale(double scale
) = 0;
81 // Gets a saved value of the zoom scale of full screen magnifier. If a value
82 // is not saved, return a negative value.
83 virtual double GetSavedScreenMagnifierScale() = 0;
85 // Triggers an accessibility alert to give the user feedback.
86 virtual void TriggerAccessibilityAlert(AccessibilityAlert alert
) = 0;
88 // Gets the last accessibility alert that was triggered.
89 virtual AccessibilityAlert
GetLastAccessibilityAlert() = 0;
91 // Initiates play of shutdown sound and returns it's duration.
92 virtual base::TimeDelta
PlayShutdownSound() const = 0;
97 #endif // ASH_ACCESSIBILITYDELEGATE_H_