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

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

Issue 15108002: Add Pause and Resume to Web TTS & Extension TTS APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 7 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
« no previous file with comments | « chrome/browser/speech/tts_mac.mm ('k') | chrome/browser/speech/tts_platform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/speech/tts_message_filter.cc
diff --git a/chrome/browser/speech/tts_message_filter.cc b/chrome/browser/speech/tts_message_filter.cc
index c7dec7a420b9013a0580cfaa96e3a75dfac3b450..6b94b8c9e047972e672bed8fc1e5d987941adec7 100644
--- a/chrome/browser/speech/tts_message_filter.cc
+++ b/chrome/browser/speech/tts_message_filter.cc
@@ -89,11 +89,11 @@ void TtsMessageFilter::OnSpeak(const TtsUtteranceRequest& request) {
}
void TtsMessageFilter::OnPause() {
- // TODO(dmazzoni): Not supported by TtsController yet.
+ TtsController::GetInstance()->Pause();
}
void TtsMessageFilter::OnResume() {
- // TODO(dmazzoni): Not supported by TtsController yet.
+ TtsController::GetInstance()->Resume();
}
void TtsMessageFilter::OnCancel() {
@@ -130,6 +130,12 @@ void TtsMessageFilter::OnTtsEvent(Utterance* utterance,
Send(new TtsMsg_SpeakingErrorOccurred(
utterance->src_id(), error_message));
break;
+ case TTS_EVENT_PAUSE:
+ Send(new TtsMsg_DidPauseSpeaking(utterance->src_id()));
+ break;
+ case TTS_EVENT_RESUME:
+ Send(new TtsMsg_DidResumeSpeaking(utterance->src_id()));
+ break;
}
}
« no previous file with comments | « chrome/browser/speech/tts_mac.mm ('k') | chrome/browser/speech/tts_platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698