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 #include "ash/magnifier/magnifier_constants.h" |
| 10 |
| 11 class Browser; |
9 | 12 |
10 namespace content { | 13 namespace content { |
11 class WebUI; | 14 class WebUI; |
12 } | 15 } |
13 | 16 |
14 namespace chromeos { | 17 namespace chromeos { |
15 namespace accessibility { | 18 namespace accessibility { |
16 | 19 |
17 // Enable or disable spoken feedback. Enabling spoken feedback installs the | 20 // Enable or disable spoken feedback. Enabling spoken feedback installs the |
18 // ChromeVox component extension. If this is being called in a login/oobe | 21 // ChromeVox component extension. If this is being called in a login/oobe |
19 // login screen, pass the WebUI object in login_web_ui so that ChromeVox | 22 // login screen, pass the WebUI object in login_web_ui so that ChromeVox |
20 // can be injected directly into that screen, otherwise it should be NULL. | 23 // can be injected directly into that screen, otherwise it should be NULL. |
21 void EnableSpokenFeedback(bool enabled, content::WebUI* login_web_ui); | 24 void EnableSpokenFeedback(bool enabled, content::WebUI* login_web_ui); |
22 | 25 |
23 // Enable or disable the high contrast mode for Chrome. | 26 // Enable or disable the high contrast mode for Chrome. |
24 void EnableHighContrast(bool enabled); | 27 void EnableHighContrast(bool enabled); |
25 | 28 |
26 enum ScreenMagnifierType { | |
27 MAGNIFIER_OFF, | |
28 MAGNIFIER_FULL, | |
29 MAGNIFIER_PARTIAL, | |
30 }; | |
31 | |
32 // Set the type of screen magnifier, or disable it. | 29 // Set the type of screen magnifier, or disable it. |
33 void SetScreenMagnifier(ScreenMagnifierType type); | 30 void SetScreenMagnifier(ash::ScreenMagnifierType type); |
34 | 31 |
35 // Enable or disable the virtual keyboard. | 32 // Enable or disable the virtual keyboard. |
36 void EnableVirtualKeyboard(bool enabled); | 33 void EnableVirtualKeyboard(bool enabled); |
37 | 34 |
38 // Toggles whether Chrome OS spoken feedback is on or off. See docs for | 35 // Toggles whether Chrome OS spoken feedback is on or off. See docs for |
39 // EnableSpokenFeedback, above. | 36 // EnableSpokenFeedback, above. |
40 void ToggleSpokenFeedback(content::WebUI* login_web_ui); | 37 void ToggleSpokenFeedback(content::WebUI* login_web_ui); |
41 | 38 |
42 // Speaks the specified string. | 39 // Speaks the specified string. |
43 void Speak(const std::string& utterance); | 40 void Speak(const std::string& utterance); |
44 | 41 |
45 // Returns true if spoken feedback is enabled, or false if not. | 42 // Returns true if spoken feedback is enabled, or false if not. |
46 bool IsSpokenFeedbackEnabled(); | 43 bool IsSpokenFeedbackEnabled(); |
47 | 44 |
48 // Returns true if High Contrast is enabled, or false if not. | 45 // Returns true if High Contrast is enabled, or false if not. |
49 bool IsHighContrastEnabled(); | 46 bool IsHighContrastEnabled(); |
50 | 47 |
51 // Returns the current state of the screen magnifier. | 48 // Returns the current state of the screen magnifier. |
52 ScreenMagnifierType GetScreenMagnifierType(); | 49 ash::ScreenMagnifierType GetScreenMagnifierType(); |
53 | 50 |
54 // Translates from a string to ScreenMagnifierType. | 51 // Translates from a string to ScreenMagnifierType. |
55 ScreenMagnifierType ScreenMagnifierTypeFromName(const char type_name[]); | 52 ash::ScreenMagnifierType ScreenMagnifierTypeFromName(const char type_name[]); |
56 | 53 |
57 // Translates from a ScreenMagnifierType to type string. | 54 // Translates from a ScreenMagnifierType to type string. |
58 const char* ScreenMagnifierNameFromType(ScreenMagnifierType type); | 55 const char* ScreenMagnifierNameFromType(ash::ScreenMagnifierType type); |
59 | 56 |
60 // Speak the given text if the accessibility pref is already set. | 57 // Speak the given text if the accessibility pref is already set. |
61 void MaybeSpeak(const std::string& utterance); | 58 void MaybeSpeak(const std::string& utterance); |
62 | 59 |
| 60 // Show the accessibility help tab on the browser. |
| 61 void ShowAccessibilityHelp(Browser* browser); |
| 62 |
63 } // namespace accessibility | 63 } // namespace accessibility |
64 } // namespace chromeos | 64 } // namespace chromeos |
65 | 65 |
66 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_UTIL_H_ | 66 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_UTIL_H_ |
OLD | NEW |