Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: chrome/browser/chromeos/accessibility/accessibility_util.h

Issue 11415025: A11y: Introduce High Contrast Mode and Screen Magnifier to ubar tray. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase @170134 Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 // String constants of the magnifier types. 30 // Sets the type of screen magnifier, or disable it.
27 extern const char kScreenMagnifierOff[]; 31 void SetMagnifier(ash::MagnifierType type);
28 extern const char kScreenMagnifierFull[];
29 extern const char kScreenMagnifierPartial[];
30 32
31 enum ScreenMagnifierType { 33 // Enables or disable the virtual keyboard.
32 MAGNIFIER_OFF,
33 MAGNIFIER_FULL,
34 MAGNIFIER_PARTIAL,
35 };
36
37 // Set the type of screen magnifier, or disable it.
38 void SetScreenMagnifier(ScreenMagnifierType type);
39
40 // Enable or disable the virtual keyboard.
41 void EnableVirtualKeyboard(bool enabled); 34 void EnableVirtualKeyboard(bool enabled);
42 35
43 // 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
44 // EnableSpokenFeedback, above. 37 // EnableSpokenFeedback, above.
45 void ToggleSpokenFeedback(content::WebUI* login_web_ui); 38 void ToggleSpokenFeedback(content::WebUI* login_web_ui);
46 39
47 // Speaks the specified string. 40 // Speaks the specified string.
48 void Speak(const std::string& utterance); 41 void Speak(const std::string& utterance);
49 42
50 // Returns true if spoken feedback is enabled, or false if not. 43 // Returns true if spoken feedback is enabled, or false if not.
51 bool IsSpokenFeedbackEnabled(); 44 bool IsSpokenFeedbackEnabled();
52 45
53 // Returns true if High Contrast is enabled, or false if not. 46 // Returns true if High Contrast is enabled, or false if not.
54 bool IsHighContrastEnabled(); 47 bool IsHighContrastEnabled();
55 48
56 // Returns the current state of the screen magnifier. 49 // Returns the current state of the screen magnifier.
57 ScreenMagnifierType GetScreenMagnifierType(); 50 ash::MagnifierType GetMagnifierType();
58 51
59 // Translates from a string to ScreenMagnifierType. 52 // Translates from a string to MagnifierType.
60 ScreenMagnifierType ScreenMagnifierTypeFromName(const char type_name[]); 53 ash::MagnifierType MagnifierTypeFromName(const char type_name[]);
61 54
62 // Translates from a ScreenMagnifierType to type string. 55 // Translates from a MagnifierType to type string.
63 const char* ScreenMagnifierNameFromType(ScreenMagnifierType type); 56 const char* ScreenMagnifierNameFromType(ash::MagnifierType type);
64 57
65 // Speak the given text if the accessibility pref is already set. 58 // Speaks the given text if the accessibility pref is already set.
66 void MaybeSpeak(const std::string& utterance); 59 void MaybeSpeak(const std::string& utterance);
67 60
61 // Shows the accessibility help tab on the browser.
62 void ShowAccessibilityHelp(Browser* browser);
63
68 } // namespace accessibility 64 } // namespace accessibility
69 } // namespace chromeos 65 } // namespace chromeos
70 66
71 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_UTIL_H_ 67 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_UTIL_H_
OLDNEW
« no previous file with comments | « ash/test/test_shell_delegate.cc ('k') | chrome/browser/chromeos/accessibility/accessibility_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698