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

Unified Diff: chrome/browser/chromeos/login/wizard_accessibility_handler.cc

Issue 3442011: Enabling access notifications for login wizard (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 months 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
Index: chrome/browser/chromeos/login/wizard_accessibility_handler.cc
===================================================================
--- chrome/browser/chromeos/login/wizard_accessibility_handler.cc (revision 60696)
+++ chrome/browser/chromeos/login/wizard_accessibility_handler.cc (working copy)
@@ -17,7 +17,7 @@
info = Details<const AccessibilityControlInfo>(details).ptr();
switch (type.value) {
case NotificationType::ACCESSIBILITY_CONTROL_FOCUSED:
- Speak(info->name().c_str());
+ Speak(info->name().c_str(), false, true);
break;
case NotificationType::ACCESSIBILITY_CONTROL_ACTION:
break;
@@ -33,11 +33,20 @@
}
}
-void WizardAccessibilityHandler::Speak(const char* speak_str) {
+void WizardAccessibilityHandler::Speak(const char* speak_str,
+ bool queue,
+ bool interruptible) {
if (chromeos::CrosLibrary::Get()->EnsureLoaded()) {
+ if (queue || !interruptible) {
+ std::string props = "";
+ props.append("enqueue=");
+ props.append(queue ? "1;" : "0;");
+ props.append("interruptible=");
+ props.append(interruptible ? "1;" : "0;");
+ chromeos::CrosLibrary::Get()->GetSpeechSynthesisLibrary()->
+ SetSpeakProperties(props.c_str());
+ }
chromeos::CrosLibrary::Get()->GetSpeechSynthesisLibrary()->
- StopSpeaking();
- chromeos::CrosLibrary::Get()->GetSpeechSynthesisLibrary()->
Speak(speak_str);
}
}

Powered by Google App Engine
This is Rietveld 408576698