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

Unified Diff: chrome/browser/chromeos/accessibility_util.cc

Issue 8402023: Speak a message when accessibility is on and the network state changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review fix Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/accessibility_util.h ('k') | chrome/browser/chromeos/status/network_menu_icon.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/accessibility_util.cc
diff --git a/chrome/browser/chromeos/accessibility_util.cc b/chrome/browser/chromeos/accessibility_util.cc
index b43b7f4e0164463742285b8a4e2d6791998becdf..da4693c080b3e0bae3e8f5749eef4a4c7f0cf268 100644
--- a/chrome/browser/chromeos/accessibility_util.cc
+++ b/chrome/browser/chromeos/accessibility_util.cc
@@ -163,6 +163,17 @@ void Speak(const char* speak_str, bool queue, bool interruptible) {
Speak(speak_str);
}
+void MaybeSpeak(const char* speak_str, bool queue, bool interruptible) {
+ if (!g_browser_process) {
+ return;
+ }
+ PrefService* prefs = g_browser_process->local_state();
+ bool accessibility_enabled = prefs &&
+ prefs->GetBoolean(prefs::kAccessibilityEnabled);
+ if (accessibility_enabled) {
+ Speak(speak_str, queue, interruptible);
+ }
+}
} // namespace accessibility
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/accessibility_util.h ('k') | chrome/browser/chromeos/status/network_menu_icon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698