| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_SPEECH_TTS_CONTROLLER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_SPEECH_TTS_CONTROLLER_IMPL_H_ |
| 6 #define CHROME_BROWSER_SPEECH_TTS_CONTROLLER_IMPL_H_ | 6 #define CHROME_BROWSER_SPEECH_TTS_CONTROLLER_IMPL_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 void FinishCurrentUtterance(); | 68 void FinishCurrentUtterance(); |
| 69 | 69 |
| 70 // Start speaking the next utterance in the queue. | 70 // Start speaking the next utterance in the queue. |
| 71 void SpeakNextUtterance(); | 71 void SpeakNextUtterance(); |
| 72 | 72 |
| 73 // Given an utterance and a vector of voices, return the | 73 // Given an utterance and a vector of voices, return the |
| 74 // index of the voice that best matches the utterance. | 74 // index of the voice that best matches the utterance. |
| 75 int GetMatchingVoice(const Utterance* utterance, | 75 int GetMatchingVoice(const Utterance* utterance, |
| 76 std::vector<VoiceData>& voices); | 76 std::vector<VoiceData>& voices); |
| 77 | 77 |
| 78 friend struct DefaultSingletonTraits<TtsControllerImpl>; | 78 friend struct base::DefaultSingletonTraits<TtsControllerImpl>; |
| 79 | 79 |
| 80 // The current utterance being spoken. | 80 // The current utterance being spoken. |
| 81 Utterance* current_utterance_; | 81 Utterance* current_utterance_; |
| 82 | 82 |
| 83 // Whether the queue is paused or not. | 83 // Whether the queue is paused or not. |
| 84 bool paused_; | 84 bool paused_; |
| 85 | 85 |
| 86 // A queue of utterances to speak after the current one finishes. | 86 // A queue of utterances to speak after the current one finishes. |
| 87 std::queue<Utterance*> utterance_queue_; | 87 std::queue<Utterance*> utterance_queue_; |
| 88 | 88 |
| 89 // A set of delegates that want to be notified when the voices change. | 89 // A set of delegates that want to be notified when the voices change. |
| 90 std::set<VoicesChangedDelegate*> voices_changed_delegates_; | 90 std::set<VoicesChangedDelegate*> voices_changed_delegates_; |
| 91 | 91 |
| 92 // A pointer to the platform implementation of text-to-speech, for | 92 // A pointer to the platform implementation of text-to-speech, for |
| 93 // dependency injection. | 93 // dependency injection. |
| 94 TtsPlatformImpl* platform_impl_; | 94 TtsPlatformImpl* platform_impl_; |
| 95 | 95 |
| 96 // The delegate that processes TTS requests with user-installed extensions. | 96 // The delegate that processes TTS requests with user-installed extensions. |
| 97 TtsEngineDelegate* tts_engine_delegate_; | 97 TtsEngineDelegate* tts_engine_delegate_; |
| 98 | 98 |
| 99 DISALLOW_COPY_AND_ASSIGN(TtsControllerImpl); | 99 DISALLOW_COPY_AND_ASSIGN(TtsControllerImpl); |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 #endif // CHROME_BROWSER_SPEECH_TTS_CONTROLLER_IMPL_H_ | 102 #endif // CHROME_BROWSER_SPEECH_TTS_CONTROLLER_IMPL_H_ |
| OLD | NEW |