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

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

Issue 8511026: Don't start speech synthesis until after the audio mixer is initialized. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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/audio_mixer_alsa.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
===================================================================
--- chrome/browser/chromeos/accessibility_util.cc (revision 109026)
+++ chrome/browser/chromeos/accessibility_util.cc (working copy)
@@ -8,9 +8,8 @@
#include "base/bind_helpers.h"
#include "base/logging.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/chromeos/dbus/dbus_thread_manager.h"
-#include "chrome/browser/chromeos/dbus/speech_synthesizer_client.h"
#include "chrome/browser/extensions/extension_accessibility_api.h"
+#include "chrome/browser/extensions/extension_tts_api_platform.h"
#include "chrome/browser/extensions/component_loader.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/file_reader.h"
@@ -101,8 +100,7 @@
Speak(enabled ?
l10n_util::GetStringUTF8(IDS_CHROMEOS_ACC_ACCESS_ENABLED).c_str() :
- l10n_util::GetStringUTF8(IDS_CHROMEOS_ACC_ACCESS_DISABLED).c_str(),
- false, true);
+ l10n_util::GetStringUTF8(IDS_CHROMEOS_ACC_ACCESS_DISABLED).c_str());
// Load/Unload ChromeVox
Profile* profile = ProfileManager::GetDefaultProfile();
@@ -149,18 +147,13 @@
EnableAccessibility(accessibility_enabled, login_web_ui);
};
-void Speak(const char* speak_str, bool queue, bool interruptible) {
- if (queue || !interruptible) {
- std::string props = "";
- props.append("enqueue=");
- props.append(queue ? "1;" : "0;");
- props.append("interruptible=");
- props.append(interruptible ? "1;" : "0;");
- chromeos::DBusThreadManager::Get()->GetSpeechSynthesizerClient()->
- SetSpeakProperties(props);
- }
- chromeos::DBusThreadManager::Get()->GetSpeechSynthesizerClient()->
- Speak(speak_str);
+void Speak(const char* utterance) {
+ UtteranceContinuousParameters params;
+ ExtensionTtsPlatformImpl::GetInstance()->Speak(
+ -1, // No utterance ID because we don't need a callback when it finishes.
+ utterance,
+ g_browser_process->GetApplicationLocale(),
+ params);
}
« no previous file with comments | « chrome/browser/chromeos/accessibility_util.h ('k') | chrome/browser/chromeos/audio_mixer_alsa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698