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), |
27 notify(notify) {} | 36 notify(notify) {} |
28 | 37 |
29 bool enabled; | 38 bool enabled; |
| 39 ash::MagnifierType magnifier_type; |
30 ash::AccessibilityNotificationVisibility notify; | 40 ash::AccessibilityNotificationVisibility notify; |
31 }; | 41 }; |
32 | 42 |
33 // Do any accessibility initialization that should happen once on startup. | 43 // Do any accessibility initialization that should happen once on startup. |
34 void Initialize(); | 44 void Initialize(); |
35 | 45 |
36 // Enables or disables spoken feedback. Enabling spoken feedback installs the | 46 // Enables or disables spoken feedback. Enabling spoken feedback installs the |
37 // ChromeVox component extension. If this is being called in a login/oobe | 47 // ChromeVox component extension. If this is being called in a login/oobe |
38 // login screen, pass the WebUI object in login_web_ui so that ChromeVox | 48 // login screen, pass the WebUI object in login_web_ui so that ChromeVox |
39 // can be injected directly into that screen, otherwise it should be NULL. | 49 // can be injected directly into that screen, otherwise it should be NULL. |
(...skipping 17 matching lines...) Expand all Loading... |
57 | 67 |
58 // Returns true if spoken feedback is enabled, or false if not. | 68 // Returns true if spoken feedback is enabled, or false if not. |
59 bool IsSpokenFeedbackEnabled(); | 69 bool IsSpokenFeedbackEnabled(); |
60 | 70 |
61 // Returns true if High Contrast is enabled, or false if not. | 71 // Returns true if High Contrast is enabled, or false if not. |
62 bool IsHighContrastEnabled(); | 72 bool IsHighContrastEnabled(); |
63 | 73 |
64 // Returns true if the Virtual Keyboard is enabled, or false if not. | 74 // Returns true if the Virtual Keyboard is enabled, or false if not. |
65 bool IsVirtualKeyboardEnabled(); | 75 bool IsVirtualKeyboardEnabled(); |
66 | 76 |
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 | |
73 // Speaks the given text if the accessibility pref is already set. | 77 // Speaks the given text if the accessibility pref is already set. |
74 void MaybeSpeak(const std::string& utterance); | 78 void MaybeSpeak(const std::string& utterance); |
75 | 79 |
76 // Shows the accessibility help tab on the browser. | 80 // Shows the accessibility help tab on the browser. |
77 void ShowAccessibilityHelp(Browser* browser); | 81 void ShowAccessibilityHelp(Browser* browser); |
78 | 82 |
79 } // namespace accessibility | 83 } // namespace accessibility |
80 } // namespace chromeos | 84 } // namespace chromeos |
81 | 85 |
82 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_UTIL_H_ | 86 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_UTIL_H_ |
OLD | NEW |