OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_EXTENSIONS_EXTENSION_TTS_ENGINE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TTS_ENGINE_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TTS_ENGINE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TTS_ENGINE_API_H_ |
7 | 7 |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "chrome/browser/extensions/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
10 | 10 |
11 class Extension; | 11 class Extension; |
12 class Utterance; | 12 class Utterance; |
13 | 13 |
| 14 namespace base { |
| 15 class ListValue; |
| 16 } |
| 17 |
14 // Return a list of all available voices registered by extensions. | 18 // Return a list of all available voices registered by extensions. |
15 void GetExtensionVoices(Profile* profile, ListValue* result_voices); | 19 void GetExtensionVoices(Profile* profile, base::ListValue* result_voices); |
16 | 20 |
17 // Find the first extension with a tts_voices in its | 21 // Find the first extension with a tts_voices in its |
18 // manifest that matches the speech parameters of this utterance. | 22 // manifest that matches the speech parameters of this utterance. |
19 // If found, store a pointer to the extension in |matching_extension| and | 23 // If found, store a pointer to the extension in |matching_extension| and |
20 // the index of the voice within the extension in |voice_index| and | 24 // the index of the voice within the extension in |voice_index| and |
21 // return true. | 25 // return true. |
22 bool GetMatchingExtensionVoice(Utterance* utterance, | 26 bool GetMatchingExtensionVoice(Utterance* utterance, |
23 const Extension** matching_extension, | 27 const Extension** matching_extension, |
24 size_t* voice_index); | 28 size_t* voice_index); |
25 | 29 |
(...skipping 10 matching lines...) Expand all Loading... |
36 // Hidden/internal extension function used to allow TTS engine extensions | 40 // Hidden/internal extension function used to allow TTS engine extensions |
37 // to send events back to the client that's calling tts.speak(). | 41 // to send events back to the client that's calling tts.speak(). |
38 class ExtensionTtsEngineSendTtsEventFunction : public SyncExtensionFunction { | 42 class ExtensionTtsEngineSendTtsEventFunction : public SyncExtensionFunction { |
39 private: | 43 private: |
40 virtual ~ExtensionTtsEngineSendTtsEventFunction() {} | 44 virtual ~ExtensionTtsEngineSendTtsEventFunction() {} |
41 virtual bool RunImpl() OVERRIDE; | 45 virtual bool RunImpl() OVERRIDE; |
42 DECLARE_EXTENSION_FUNCTION_NAME("experimental.ttsEngine.sendTtsEvent") | 46 DECLARE_EXTENSION_FUNCTION_NAME("experimental.ttsEngine.sendTtsEvent") |
43 }; | 47 }; |
44 | 48 |
45 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TTS_ENGINE_API_H_ | 49 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TTS_ENGINE_API_H_ |
OLD | NEW |