closure: fix compile error by adding missing externs
[chromium-blink-merge.git] / ash / accessibility_delegate.h
blob8e7e286e4d72174c7ecbde01f7580328edbe92ec
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 "base/time/time.h"
10 #include "ui/chromeos/accessibility_types.h"
12 namespace ash {
14 // A delegate class to control and query accessibility features.
15 class ASH_EXPORT AccessibilityDelegate {
16 public:
17 virtual ~AccessibilityDelegate() {}
19 // Invoked to toggle spoken feedback for accessibility
20 virtual void ToggleSpokenFeedback(
21 ui::AccessibilityNotificationVisibility notify) = 0;
23 // Returns true if spoken feedback is enabled.
24 virtual bool IsSpokenFeedbackEnabled() const = 0;
26 // Invoked to toggle high contrast mode for accessibility.
27 virtual void ToggleHighContrast() = 0;
29 // Returns true if high contrast mode is enabled.
30 virtual bool IsHighContrastEnabled() const = 0;
32 // Invoked to enable the screen magnifier.
33 virtual void SetMagnifierEnabled(bool enabled) = 0;
35 // Invoked to change the type of the screen magnifier.
36 virtual void SetMagnifierType(ui::MagnifierType type) = 0;
38 // Returns true if the screen magnifier is enabled.
39 virtual bool IsMagnifierEnabled() const = 0;
41 // Returns the current screen magnifier mode.
42 virtual ui::MagnifierType GetMagnifierType() const = 0;
44 // Invoked to enable Large Cursor.
45 virtual void SetLargeCursorEnabled(bool enabled) = 0;
47 // Returns ture if Large Cursor is enabled.
48 virtual bool IsLargeCursorEnabled() const = 0;
50 // Invoked to enable autoclick.
51 virtual void SetAutoclickEnabled(bool enabled) = 0;
53 // Returns if autoclick is enabled or not.
54 virtual bool IsAutoclickEnabled() const = 0;
56 // Invoked to enable or disable the a11y on-screen keyboard.
57 virtual void SetVirtualKeyboardEnabled(bool enabled) = 0;
59 // Returns if the a11y virtual keyboard is enabled.
60 virtual bool IsVirtualKeyboardEnabled() const = 0;
62 // Returns true when the accessibility menu should be shown.
63 virtual bool ShouldShowAccessibilityMenu() const = 0;
65 // Returns true if a braille display is connected to the system.
66 virtual bool IsBrailleDisplayConnected() const = 0;
68 // Cancel all current and queued speech immediately.
69 virtual void SilenceSpokenFeedback() const = 0;
71 // Saves the zoom scale of the full screen magnifier.
72 virtual void SaveScreenMagnifierScale(double scale) = 0;
74 // Gets a saved value of the zoom scale of full screen magnifier. If a value
75 // is not saved, return a negative value.
76 virtual double GetSavedScreenMagnifierScale() = 0;
78 // Triggers an accessibility alert to give the user feedback.
79 virtual void TriggerAccessibilityAlert(ui::AccessibilityAlert alert) = 0;
81 // Gets the last accessibility alert that was triggered.
82 virtual ui::AccessibilityAlert GetLastAccessibilityAlert() = 0;
84 // Plays an earcon. Earcons are brief and distinctive sounds that indicate
85 // when their mapped event has occurred. The sound key enums can be found in
86 // chromeos/audio/chromeos_sounds.h.
87 virtual void PlayEarcon(int sound_key) = 0;
89 // Initiates play of shutdown sound and returns it's duration.
90 virtual base::TimeDelta PlayShutdownSound() const = 0;
93 } // namespace ash
95 #endif // ASH_ACCESSIBILITY_DELEGATE_H_