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