OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_UTIL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_UTIL_H_ |
6 #define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_UTIL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ash/magnifier/magnifier_constants.h" | 10 #include "ash/magnifier/magnifier_constants.h" |
11 | 11 |
12 class Browser; | 12 class Browser; |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 class WebUI; | 15 class WebUI; |
16 } | 16 } |
17 | 17 |
18 namespace chromeos { | 18 namespace chromeos { |
19 namespace accessibility { | 19 namespace accessibility { |
20 | 20 |
21 // Do any accessibility initialization that should happen once on startup. | |
22 void Initialize(); | |
23 | |
24 // Enables or disables spoken feedback. Enabling spoken feedback installs the | 21 // Enables or disables spoken feedback. Enabling spoken feedback installs the |
25 // ChromeVox component extension. If this is being called in a login/oobe | 22 // ChromeVox component extension. If this is being called in a login/oobe |
26 // login screen, pass the WebUI object in login_web_ui so that ChromeVox | 23 // login screen, pass the WebUI object in login_web_ui so that ChromeVox |
27 // can be injected directly into that screen, otherwise it should be NULL. | 24 // can be injected directly into that screen, otherwise it should be NULL. |
28 void EnableSpokenFeedback(bool enabled, content::WebUI* login_web_ui); | 25 void EnableSpokenFeedback(bool enabled, content::WebUI* login_web_ui); |
29 | 26 |
30 // Enables or disables the high contrast mode for Chrome. | 27 // Enables or disables the high contrast mode for Chrome. |
31 void EnableHighContrast(bool enabled); | 28 void EnableHighContrast(bool enabled); |
32 | 29 |
33 // Sets the type of screen magnifier, or disable it. | 30 // Sets the type of screen magnifier, or disable it. |
34 void SetMagnifier(ash::MagnifierType type); | 31 void SetMagnifier(ash::MagnifierType type); |
35 | 32 |
36 // Enables or disable the virtual keyboard. | 33 // Enables or disable the virtual keyboard. |
37 void EnableVirtualKeyboard(bool enabled); | 34 void EnableVirtualKeyboard(bool enabled); |
38 | 35 |
39 // Toggles whether Chrome OS spoken feedback is on or off. See docs for | 36 // Toggles whether Chrome OS spoken feedback is on or off. See docs for |
40 // EnableSpokenFeedback, above. | 37 // EnableSpokenFeedback, above. |
41 void ToggleSpokenFeedback(content::WebUI* login_web_ui); | 38 void ToggleSpokenFeedback(content::WebUI* login_web_ui); |
42 | 39 |
43 // Speaks the specified string. | 40 // Speaks the specified string. |
44 void Speak(const std::string& utterance); | 41 void Speak(const std::string& utterance); |
45 | 42 |
46 // Returns true if spoken feedback is enabled, or false if not. | 43 // Returns true if spoken feedback is enabled, or false if not. |
47 bool IsSpokenFeedbackEnabled(); | 44 bool IsSpokenFeedbackEnabled(); |
48 | 45 |
49 // Returns true if High Contrast is enabled, or false if not. | 46 // Returns true if High Contrast is enabled, or false if not. |
50 bool IsHighContrastEnabled(); | 47 bool IsHighContrastEnabled(); |
51 | 48 |
52 // Returns true if the Virtual Keyboard is enabled, or false if not. | |
53 bool IsVirtualKeyboardEnabled(); | |
54 | |
55 // Returns the current state of the screen magnifier. | 49 // Returns the current state of the screen magnifier. |
56 ash::MagnifierType GetMagnifierType(); | 50 ash::MagnifierType GetMagnifierType(); |
57 | 51 |
58 // Translates from a string to MagnifierType. | 52 // Translates from a string to MagnifierType. |
59 ash::MagnifierType MagnifierTypeFromName(const char type_name[]); | 53 ash::MagnifierType MagnifierTypeFromName(const char type_name[]); |
60 | 54 |
61 // Translates from a MagnifierType to type string. | 55 // Translates from a MagnifierType to type string. |
62 const char* ScreenMagnifierNameFromType(ash::MagnifierType type); | 56 const char* ScreenMagnifierNameFromType(ash::MagnifierType type); |
63 | 57 |
64 // Speaks the given text if the accessibility pref is already set. | 58 // Speaks the given text if the accessibility pref is already set. |
65 void MaybeSpeak(const std::string& utterance); | 59 void MaybeSpeak(const std::string& utterance); |
66 | 60 |
67 // Shows the accessibility help tab on the browser. | 61 // Shows the accessibility help tab on the browser. |
68 void ShowAccessibilityHelp(Browser* browser); | 62 void ShowAccessibilityHelp(Browser* browser); |
69 | 63 |
70 } // namespace accessibility | 64 } // namespace accessibility |
71 } // namespace chromeos | 65 } // namespace chromeos |
72 | 66 |
73 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_UTIL_H_ | 67 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_UTIL_H_ |
OLD | NEW |