Index: chrome/browser/speech/tts_controller.h |
diff --git a/chrome/browser/speech/tts_controller.h b/chrome/browser/speech/tts_controller.h |
index b6b7372a645b9ca2d1c1bba57ba16da7cf383d39..b55600aa06df417a2146d4232b928c4574ab064e 100644 |
--- a/chrome/browser/speech/tts_controller.h |
+++ b/chrome/browser/speech/tts_controller.h |
@@ -31,7 +31,9 @@ enum TtsEventType { |
TTS_EVENT_MARKER, |
TTS_EVENT_INTERRUPTED, |
TTS_EVENT_CANCELLED, |
- TTS_EVENT_ERROR |
+ TTS_EVENT_ERROR, |
+ TTS_EVENT_PAUSE, |
+ TTS_EVENT_RESUME |
}; |
enum TtsGenderType { |
@@ -251,9 +253,17 @@ class TtsController { |
// immediately. |
void SpeakOrEnqueue(Utterance* utterance); |
- // Stop all utterances and flush the queue. |
+ // Stop all utterances and flush the queue. Implies leaving pause mode |
+ // as well. |
void Stop(); |
+ // Pause the speech queue. Some engines may support pausing in the middle |
+ // of an utterance. |
+ void Pause(); |
+ |
+ // Resume speaking. |
+ void Resume(); |
+ |
// Handle events received from the speech engine. Events are forwarded to |
// the callback function, and in addition, completion and error events |
// trigger finishing the current utterance and starting the next one, if |
@@ -317,6 +327,9 @@ class TtsController { |
// The current utterance being spoken. |
Utterance* current_utterance_; |
+ // Whether the queue is paused or not. |
+ bool paused_; |
+ |
// A queue of utterances to speak after the current one finishes. |
std::queue<Utterance*> utterance_queue_; |