Add UMA stats for ExtensionCache
[chromium-blink-merge.git] / ash / accessibility_delegate.h
blob8d4b9328edff50da4af919c2e8da604c301ab6dc
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
24 // A deletate class to control accessibility features.
25 class ASH_EXPORT AccessibilityDelegate {
26 public:
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 // Returns if the a11y virtual keyboard is enabled.
67 virtual bool IsVirtualKeyboardEnabled() const = 0;
69 // Returns true when the accessibility menu should be shown.
70 virtual bool ShouldShowAccessibilityMenu() const = 0;
72 // Cancel all current and queued speech immediately.
73 virtual void SilenceSpokenFeedback() const = 0;
75 // Saves the zoom scale of the full screen magnifier.
76 virtual void SaveScreenMagnifierScale(double scale) = 0;
78 // Gets a saved value of the zoom scale of full screen magnifier. If a value
79 // is not saved, return a negative value.
80 virtual double GetSavedScreenMagnifierScale() = 0;
82 // Triggers an accessibility alert to give the user feedback.
83 virtual void TriggerAccessibilityAlert(AccessibilityAlert alert) = 0;
85 // Gets the last accessibility alert that was triggered.
86 virtual AccessibilityAlert GetLastAccessibilityAlert() = 0;
88 // Initiates play of shutdown sound and returns it's duration.
89 virtual base::TimeDelta PlayShutdownSound() const = 0;
92 } // namespace ash
94 #endif // ASH_ACCESSIBILITYDELEGATE_H_