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