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

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

Issue 11414232: Add Chrome OS accessibility histograms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-land without offending line for now. 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/accessibility/accessibility_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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" 10 #include "ash/magnifier/magnifier_constants.h"
11 11
12 class Browser; 12 class Browser;
13 13
14 namespace content { 14 namespace content {
15 class WebUI; 15 class WebUI;
16 } 16 }
17 17
18 namespace chromeos { 18 namespace chromeos {
19 namespace accessibility { 19 namespace accessibility {
20 20
21 // Do any accessibility initialization that should happen once on startup.
22 void Initialize();
23
21 // Enables or disables spoken feedback. Enabling spoken feedback installs the 24 // Enables or disables spoken feedback. Enabling spoken feedback installs the
22 // ChromeVox component extension. If this is being called in a login/oobe 25 // ChromeVox component extension. If this is being called in a login/oobe
23 // login screen, pass the WebUI object in login_web_ui so that ChromeVox 26 // login screen, pass the WebUI object in login_web_ui so that ChromeVox
24 // can be injected directly into that screen, otherwise it should be NULL. 27 // can be injected directly into that screen, otherwise it should be NULL.
25 void EnableSpokenFeedback(bool enabled, content::WebUI* login_web_ui); 28 void EnableSpokenFeedback(bool enabled, content::WebUI* login_web_ui);
26 29
27 // Enables or disables the high contrast mode for Chrome. 30 // Enables or disables the high contrast mode for Chrome.
28 void EnableHighContrast(bool enabled); 31 void EnableHighContrast(bool enabled);
29 32
30 // Sets the type of screen magnifier, or disable it. 33 // Sets the type of screen magnifier, or disable it.
31 void SetMagnifier(ash::MagnifierType type); 34 void SetMagnifier(ash::MagnifierType type);
32 35
33 // Enables or disable the virtual keyboard. 36 // Enables or disable the virtual keyboard.
34 void EnableVirtualKeyboard(bool enabled); 37 void EnableVirtualKeyboard(bool enabled);
35 38
36 // Toggles whether Chrome OS spoken feedback is on or off. See docs for 39 // Toggles whether Chrome OS spoken feedback is on or off. See docs for
37 // EnableSpokenFeedback, above. 40 // EnableSpokenFeedback, above.
38 void ToggleSpokenFeedback(content::WebUI* login_web_ui); 41 void ToggleSpokenFeedback(content::WebUI* login_web_ui);
39 42
40 // Speaks the specified string. 43 // Speaks the specified string.
41 void Speak(const std::string& utterance); 44 void Speak(const std::string& utterance);
42 45
43 // Returns true if spoken feedback is enabled, or false if not. 46 // Returns true if spoken feedback is enabled, or false if not.
44 bool IsSpokenFeedbackEnabled(); 47 bool IsSpokenFeedbackEnabled();
45 48
46 // Returns true if High Contrast is enabled, or false if not. 49 // Returns true if High Contrast is enabled, or false if not.
47 bool IsHighContrastEnabled(); 50 bool IsHighContrastEnabled();
48 51
52 // Returns true if the Virtual Keyboard is enabled, or false if not.
53 bool IsVirtualKeyboardEnabled();
54
49 // Returns the current state of the screen magnifier. 55 // Returns the current state of the screen magnifier.
50 ash::MagnifierType GetMagnifierType(); 56 ash::MagnifierType GetMagnifierType();
51 57
52 // Translates from a string to MagnifierType. 58 // Translates from a string to MagnifierType.
53 ash::MagnifierType MagnifierTypeFromName(const char type_name[]); 59 ash::MagnifierType MagnifierTypeFromName(const char type_name[]);
54 60
55 // Translates from a MagnifierType to type string. 61 // Translates from a MagnifierType to type string.
56 const char* ScreenMagnifierNameFromType(ash::MagnifierType type); 62 const char* ScreenMagnifierNameFromType(ash::MagnifierType type);
57 63
58 // Speaks the given text if the accessibility pref is already set. 64 // Speaks the given text if the accessibility pref is already set.
59 void MaybeSpeak(const std::string& utterance); 65 void MaybeSpeak(const std::string& utterance);
60 66
61 // Shows the accessibility help tab on the browser. 67 // Shows the accessibility help tab on the browser.
62 void ShowAccessibilityHelp(Browser* browser); 68 void ShowAccessibilityHelp(Browser* browser);
63 69
64 } // namespace accessibility 70 } // namespace accessibility
65 } // namespace chromeos 71 } // namespace chromeos
66 72
67 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_UTIL_H_ 73 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_ACCESSIBILITY_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/accessibility/accessibility_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698