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(); |