| 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_CHROMEOS_ACCESSIBILITY_SPEECH_MONITOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SPEECH_MONITOR_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SPEECH_MONITOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SPEECH_MONITOR_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 virtual ~SpeechMonitor(); | 22 virtual ~SpeechMonitor(); |
| 23 | 23 |
| 24 // Blocks until the next utterance is spoken, and returns its text. | 24 // Blocks until the next utterance is spoken, and returns its text. |
| 25 std::string GetNextUtterance(); | 25 std::string GetNextUtterance(); |
| 26 | 26 |
| 27 // Wait for next utterance and return true if next utterance is ChromeVox | 27 // Wait for next utterance and return true if next utterance is ChromeVox |
| 28 // enabled message. | 28 // enabled message. |
| 29 bool SkipChromeVoxEnabledMessage(); | 29 bool SkipChromeVoxEnabledMessage(); |
| 30 | 30 |
| 31 // TtsPlatformImpl implementation. | 31 // TtsPlatformImpl implementation. |
| 32 virtual bool PlatformImplAvailable() OVERRIDE; | 32 virtual bool PlatformImplAvailable() override; |
| 33 virtual bool Speak( | 33 virtual bool Speak( |
| 34 int utterance_id, | 34 int utterance_id, |
| 35 const std::string& utterance, | 35 const std::string& utterance, |
| 36 const std::string& lang, | 36 const std::string& lang, |
| 37 const VoiceData& voice, | 37 const VoiceData& voice, |
| 38 const UtteranceContinuousParameters& params) OVERRIDE; | 38 const UtteranceContinuousParameters& params) override; |
| 39 virtual bool StopSpeaking() OVERRIDE; | 39 virtual bool StopSpeaking() override; |
| 40 virtual bool IsSpeaking() OVERRIDE; | 40 virtual bool IsSpeaking() override; |
| 41 virtual void GetVoices(std::vector<VoiceData>* out_voices) OVERRIDE; | 41 virtual void GetVoices(std::vector<VoiceData>* out_voices) override; |
| 42 virtual void Pause() OVERRIDE {} | 42 virtual void Pause() override {} |
| 43 virtual void Resume() OVERRIDE {} | 43 virtual void Resume() override {} |
| 44 virtual std::string error() OVERRIDE; | 44 virtual std::string error() override; |
| 45 virtual void clear_error() OVERRIDE {} | 45 virtual void clear_error() override {} |
| 46 virtual void set_error(const std::string& error) OVERRIDE {} | 46 virtual void set_error(const std::string& error) override {} |
| 47 virtual void WillSpeakUtteranceWithVoice( | 47 virtual void WillSpeakUtteranceWithVoice( |
| 48 const Utterance* utterance, const VoiceData& voice_data) OVERRIDE; | 48 const Utterance* utterance, const VoiceData& voice_data) override; |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 scoped_refptr<content::MessageLoopRunner> loop_runner_; | 51 scoped_refptr<content::MessageLoopRunner> loop_runner_; |
| 52 std::deque<std::string> utterance_queue_; | 52 std::deque<std::string> utterance_queue_; |
| 53 | 53 |
| 54 DISALLOW_COPY_AND_ASSIGN(SpeechMonitor); | 54 DISALLOW_COPY_AND_ASSIGN(SpeechMonitor); |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 } // namespace chromeos | 57 } // namespace chromeos |
| 58 | 58 |
| 59 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SPEECH_MONITOR_H_ | 59 #endif // CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SPEECH_MONITOR_H_ |
| OLD | NEW |