| Index: chrome/browser/speech/tts_controller.cc
|
| diff --git a/chrome/browser/speech/tts_controller.cc b/chrome/browser/speech/tts_controller.cc
|
| index b966885cd30a62dbebc37e6093cb2d678698f1ed..503786d80983c239beac32e1c5ea299ce4caeb24 100644
|
| --- a/chrome/browser/speech/tts_controller.cc
|
| +++ b/chrome/browser/speech/tts_controller.cc
|
| @@ -196,6 +196,14 @@ 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());
|
| @@ -306,6 +314,11 @@ 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();
|
|
|