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 #include "ash/shell_delegate.h" | 11 #include "ash/shell_delegate.h" |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 | 13 |
14 class Browser; | 14 class Browser; |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 class WebUI; | 17 class WebUI; |
18 } | 18 } |
19 | 19 |
20 namespace chromeos { | 20 namespace chromeos { |
21 namespace accessibility { | 21 namespace accessibility { |
22 | 22 |
23 struct AccessibilityStatusEventDetails { | 23 struct AccessibilityStatusEventDetails { |
24 AccessibilityStatusEventDetails( | 24 AccessibilityStatusEventDetails( |
25 bool enabled, ash::AccessibilityNotificationVisibility notify) | 25 bool enabled, ash::AccessibilityNotificationVisibility notify) |
26 : enabled(enabled), | 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) {} | 27 notify(notify) {} |
37 | 28 |
38 bool enabled; | 29 bool enabled; |
39 ash::MagnifierType magnifier_type; | |
40 ash::AccessibilityNotificationVisibility notify; | 30 ash::AccessibilityNotificationVisibility notify; |
41 }; | 31 }; |
42 | 32 |
43 // Do any accessibility initialization that should happen once on startup. | 33 // Do any accessibility initialization that should happen once on startup. |
44 void Initialize(); | 34 void Initialize(); |
45 | 35 |
46 // Enables or disables spoken feedback. Enabling spoken feedback installs the | 36 // Enables or disables spoken feedback. Enabling spoken feedback installs the |
47 // ChromeVox component extension. If this is being called in a login/oobe | 37 // 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 | 38 // 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. | 39 // can be injected directly into that screen, otherwise it should be NULL. |
(...skipping 17 matching lines...) Expand all Loading... |
67 | 57 |
68 // Returns true if spoken feedback is enabled, or false if not. | 58 // Returns true if spoken feedback is enabled, or false if not. |
69 bool IsSpokenFeedbackEnabled(); | 59 bool IsSpokenFeedbackEnabled(); |
70 | 60 |
71 // Returns true if High Contrast is enabled, or false if not. | 61 // Returns true if High Contrast is enabled, or false if not. |
72 bool IsHighContrastEnabled(); | 62 bool IsHighContrastEnabled(); |
73 | 63 |
74 // Returns true if the Virtual Keyboard is enabled, or false if not. | 64 // Returns true if the Virtual Keyboard is enabled, or false if not. |
75 bool IsVirtualKeyboardEnabled(); | 65 bool IsVirtualKeyboardEnabled(); |
76 | 66 |
| 67 // Translates from a string to MagnifierType. |
| 68 ash::MagnifierType MagnifierTypeFromName(const char type_name[]); |
| 69 |
| 70 // Translates from a MagnifierType to type string. |
| 71 const char* ScreenMagnifierNameFromType(ash::MagnifierType type); |
| 72 |
77 // Speaks the given text if the accessibility pref is already set. | 73 // Speaks the given text if the accessibility pref is already set. |
78 void MaybeSpeak(const std::string& utterance); | 74 void MaybeSpeak(const std::string& utterance); |
79 | 75 |
80 // Shows the accessibility help tab on the browser. | 76 // Shows the accessibility help tab on the browser. |
81 void ShowAccessibilityHelp(Browser* browser); | 77 void ShowAccessibilityHelp(Browser* browser); |
82 | 78 |
83 } // namespace accessibility | 79 } // namespace accessibility |
84 } // namespace chromeos | 80 } // namespace chromeos |
85 | 81 |
86 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_UTIL_H_ | 82 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_UTIL_H_ |
OLD | NEW |