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

Unified Diff: chrome/browser/speech/tts_controller.cc

Issue 102263005: Automatically trigger installation of high-quality speech synthesis extension. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix debug assertion Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/speech/tts_controller.h ('k') | chrome/browser/speech/tts_extension_loader_chromeos.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/speech/tts_controller.cc
diff --git a/chrome/browser/speech/tts_controller.cc b/chrome/browser/speech/tts_controller.cc
index 902168c356b18d802e6f349558548df3a34ff10a..b9427ad1fbb7975d2d9ac3b133b75f94bbbd73df 100644
--- a/chrome/browser/speech/tts_controller.cc
+++ b/chrome/browser/speech/tts_controller.cc
@@ -166,6 +166,8 @@ void TtsController::SpeakNow(Utterance* utterance) {
else
voice.native = true;
+ GetPlatformImpl()->WillSpeakUtteranceWithVoice(utterance, voice);
+
if (!voice.native) {
#if !defined(OS_ANDROID)
DCHECK(!voice.extension_id.empty());
@@ -195,14 +197,6 @@ void TtsController::SpeakNow(Utterance* utterance) {
if (!success)
current_utterance_ = NULL;
- // If the native voice wasn't able to process this speech, see if
- // the browser has built-in TTS that isn't loaded yet.
- if (!success &&
- GetPlatformImpl()->LoadBuiltInTtsExtension(utterance->profile())) {
- utterance_queue_.push(utterance);
- return;
- }
-
if (!success) {
utterance->OnTtsEvent(TTS_EVENT_ERROR, kInvalidCharIndex,
GetPlatformImpl()->error());
@@ -313,11 +307,6 @@ void TtsController::SpeakNextUtterance() {
}
}
-void TtsController::RetrySpeakingQueuedUtterances() {
- if (current_utterance_ == NULL && !utterance_queue_.empty())
- SpeakNextUtterance();
-}
-
void TtsController::ClearUtteranceQueue(bool send_events) {
while (!utterance_queue_.empty()) {
Utterance* utterance = utterance_queue_.front();
« no previous file with comments | « chrome/browser/speech/tts_controller.h ('k') | chrome/browser/speech/tts_extension_loader_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698