| 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> | |
| 9 | |
| 10 #include "ash/magnifier/magnifier_constants.h" | |
| 11 #include "ash/shell_delegate.h" | |
| 12 #include "base/basictypes.h" | |
| 13 | |
| 14 class Browser; | 8 class Browser; |
| 15 | 9 |
| 16 namespace content { | |
| 17 class WebUI; | |
| 18 } | |
| 19 | |
| 20 namespace chromeos { | 10 namespace chromeos { |
| 21 namespace accessibility { | 11 namespace accessibility { |
| 22 | 12 |
| 23 struct AccessibilityStatusEventDetails { | |
| 24 AccessibilityStatusEventDetails( | |
| 25 bool enabled, ash::AccessibilityNotificationVisibility notify) | |
| 26 : enabled(enabled), | |
| 27 magnifier_type(ash::kDefaultMagnifierType), | |
| 28 notify(notify) {} | |
| 29 | |
| 30 AccessibilityStatusEventDetails( | |
| 31 bool enabled, | |
| 32 ash::MagnifierType magnifier_type, | |
| 33 ash::AccessibilityNotificationVisibility notify) | |
| 34 : enabled(enabled), | |
| 35 magnifier_type(magnifier_type), | |
| 36 notify(notify) {} | |
| 37 | |
| 38 bool enabled; | |
| 39 ash::MagnifierType magnifier_type; | |
| 40 ash::AccessibilityNotificationVisibility notify; | |
| 41 }; | |
| 42 | |
| 43 // Do any accessibility initialization that should happen once on startup. | |
| 44 void Initialize(); | |
| 45 | |
| 46 // Enables or disables spoken feedback. Enabling spoken feedback installs the | |
| 47 // ChromeVox component extension. If this is being called in a login/oobe | |
| 48 // login screen, pass the WebUI object in login_web_ui so that ChromeVox | |
| 49 // can be injected directly into that screen, otherwise it should be NULL. | |
| 50 void EnableSpokenFeedback(bool enabled, | |
| 51 content::WebUI* login_web_ui, | |
| 52 ash::AccessibilityNotificationVisibility notify); | |
| 53 | |
| 54 // Enables or disables the high contrast mode for Chrome. | |
| 55 void EnableHighContrast(bool enabled); | |
| 56 | |
| 57 // Enables or disable the virtual keyboard. | 13 // Enables or disable the virtual keyboard. |
| 58 void EnableVirtualKeyboard(bool enabled); | 14 void EnableVirtualKeyboard(bool enabled); |
| 59 | 15 |
| 60 // Toggles whether Chrome OS spoken feedback is on or off. See docs for | |
| 61 // EnableSpokenFeedback, above. | |
| 62 void ToggleSpokenFeedback(content::WebUI* login_web_ui, | |
| 63 ash::AccessibilityNotificationVisibility notify); | |
| 64 | |
| 65 // Speaks the specified string. | |
| 66 void Speak(const std::string& utterance); | |
| 67 | |
| 68 // Returns true if spoken feedback is enabled, or false if not. | |
| 69 bool IsSpokenFeedbackEnabled(); | |
| 70 | |
| 71 // Returns true if High Contrast is enabled, or false if not. | |
| 72 bool IsHighContrastEnabled(); | |
| 73 | |
| 74 // Returns true if the Virtual Keyboard is enabled, or false if not. | 16 // Returns true if the Virtual Keyboard is enabled, or false if not. |
| 75 bool IsVirtualKeyboardEnabled(); | 17 bool IsVirtualKeyboardEnabled(); |
| 76 | 18 |
| 77 // Speaks the given text if the accessibility pref is already set. | |
| 78 void MaybeSpeak(const std::string& utterance); | |
| 79 | |
| 80 // Shows the accessibility help tab on the browser. | 19 // Shows the accessibility help tab on the browser. |
| 81 void ShowAccessibilityHelp(Browser* browser); | 20 void ShowAccessibilityHelp(Browser* browser); |
| 82 | 21 |
| 83 } // namespace accessibility | 22 } // namespace accessibility |
| 84 } // namespace chromeos | 23 } // namespace chromeos |
| 85 | 24 |
| 86 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_UTIL_H_ | 25 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_UTIL_H_ |
| OLD | NEW |