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_EXTENSION_API_TTS_ENGINE_EXTENSION_API_H_ | 5 #ifndef CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_ENGINE_EXTENSION_API_H_ |
6 #define CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_ENGINE_EXTENSION_API_H_ | 6 #define CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_ENGINE_EXTENSION_API_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 public: | 33 public: |
34 static TtsExtensionEngine* GetInstance(); | 34 static TtsExtensionEngine* GetInstance(); |
35 | 35 |
36 // Overridden from TtsEngineDelegate: | 36 // Overridden from TtsEngineDelegate: |
37 virtual void GetVoices(Profile* profile, | 37 virtual void GetVoices(Profile* profile, |
38 std::vector<VoiceData>* out_voices) OVERRIDE; | 38 std::vector<VoiceData>* out_voices) OVERRIDE; |
39 virtual void Speak(Utterance* utterance, const VoiceData& voice) OVERRIDE; | 39 virtual void Speak(Utterance* utterance, const VoiceData& voice) OVERRIDE; |
40 virtual void Stop(Utterance* utterance) OVERRIDE; | 40 virtual void Stop(Utterance* utterance) OVERRIDE; |
41 virtual void Pause(Utterance* utterance) OVERRIDE; | 41 virtual void Pause(Utterance* utterance) OVERRIDE; |
42 virtual void Resume(Utterance* utterance) OVERRIDE; | 42 virtual void Resume(Utterance* utterance) OVERRIDE; |
| 43 virtual bool LoadBuiltInTtsExtension(Profile* profile) OVERRIDE; |
43 }; | 44 }; |
44 | 45 |
45 // Hidden/internal extension function used to allow TTS engine extensions | 46 // Hidden/internal extension function used to allow TTS engine extensions |
46 // to send events back to the client that's calling tts.speak(). | 47 // to send events back to the client that's calling tts.speak(). |
47 class ExtensionTtsEngineSendTtsEventFunction : public SyncExtensionFunction { | 48 class ExtensionTtsEngineSendTtsEventFunction : public SyncExtensionFunction { |
48 private: | 49 private: |
49 virtual ~ExtensionTtsEngineSendTtsEventFunction() {} | 50 virtual ~ExtensionTtsEngineSendTtsEventFunction() {} |
50 virtual bool RunSync() OVERRIDE; | 51 virtual bool RunSync() OVERRIDE; |
51 DECLARE_EXTENSION_FUNCTION("ttsEngine.sendTtsEvent", TTSENGINE_SENDTTSEVENT) | 52 DECLARE_EXTENSION_FUNCTION("ttsEngine.sendTtsEvent", TTSENGINE_SENDTTSEVENT) |
52 }; | 53 }; |
53 | 54 |
54 #endif // CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_ENGINE_EXTENSION_API_H_ | 55 #endif // CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_ENGINE_EXTENSION_API_H_ |
OLD | NEW |