OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PLATFORM_H_ | 5 #ifndef CHROME_BROWSER_SPEECH_TTS_PLATFORM_H_ |
6 #define CHROME_BROWSER_SPEECH_TTS_PLATFORM_H_ | 6 #define CHROME_BROWSER_SPEECH_TTS_PLATFORM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/speech/tts_controller.h" | 10 #include "chrome/browser/speech/tts_controller.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // Stop speaking immediately and return true on success. | 42 // Stop speaking immediately and return true on success. |
43 virtual bool StopSpeaking() = 0; | 43 virtual bool StopSpeaking() = 0; |
44 | 44 |
45 // Returns whether any speech is on going. | 45 // Returns whether any speech is on going. |
46 virtual bool IsSpeaking() = 0; | 46 virtual bool IsSpeaking() = 0; |
47 | 47 |
48 // Append information about voices provided by this platform implementation | 48 // Append information about voices provided by this platform implementation |
49 // to |out_voices|. | 49 // to |out_voices|. |
50 virtual void GetVoices(std::vector<VoiceData>* out_voices) = 0; | 50 virtual void GetVoices(std::vector<VoiceData>* out_voices) = 0; |
51 | 51 |
| 52 // Pause the current utterance, if any, until a call to Resume, |
| 53 // Speak, or StopSpeaking. |
| 54 virtual void Pause() = 0; |
| 55 |
| 56 // Resume speaking the current utterance, if it was paused. |
| 57 virtual void Resume() = 0; |
| 58 |
52 virtual std::string error(); | 59 virtual std::string error(); |
53 virtual void clear_error(); | 60 virtual void clear_error(); |
54 virtual void set_error(const std::string& error); | 61 virtual void set_error(const std::string& error); |
55 | 62 |
56 protected: | 63 protected: |
57 TtsPlatformImpl() {} | 64 TtsPlatformImpl() {} |
58 | 65 |
59 // On some platforms this may be a leaky singleton - do not rely on the | 66 // On some platforms this may be a leaky singleton - do not rely on the |
60 // destructor being called! http://crbug.com/122026 | 67 // destructor being called! http://crbug.com/122026 |
61 virtual ~TtsPlatformImpl() {} | 68 virtual ~TtsPlatformImpl() {} |
62 | 69 |
63 std::string error_; | 70 std::string error_; |
64 | 71 |
65 DISALLOW_COPY_AND_ASSIGN(TtsPlatformImpl); | 72 DISALLOW_COPY_AND_ASSIGN(TtsPlatformImpl); |
66 }; | 73 }; |
67 | 74 |
68 #endif // CHROME_BROWSER_SPEECH_TTS_PLATFORM_H_ | 75 #endif // CHROME_BROWSER_SPEECH_TTS_PLATFORM_H_ |
OLD | NEW |