Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Side by Side Diff: chrome/browser/extensions/extension_tts_engine_api.h

Issue 9808024: Move TTS extension API to chrome/browser/speech/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix chromeos compile error, rebase Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TTS_ENGINE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TTS_ENGINE_API_H_
7
8 #include "base/memory/singleton.h"
9 #include "chrome/browser/extensions/extension_function.h"
10
11 class Extension;
12 class Utterance;
13
14 namespace base {
15 class ListValue;
16 }
17
18 // Return a list of all available voices registered by extensions.
19 void GetExtensionVoices(Profile* profile, base::ListValue* result_voices);
20
21 // Find the first extension with a tts_voices in its
22 // manifest that matches the speech parameters of this utterance.
23 // If found, store a pointer to the extension in |matching_extension| and
24 // the index of the voice within the extension in |voice_index| and
25 // return true.
26 bool GetMatchingExtensionVoice(Utterance* utterance,
27 const Extension** matching_extension,
28 size_t* voice_index);
29
30 // Speak the given utterance by sending an event to the given TTS engine
31 // extension voice.
32 void ExtensionTtsEngineSpeak(Utterance* utterance,
33 const Extension* extension,
34 size_t voice_index);
35
36 // Stop speaking the given utterance by sending an event to the extension
37 // associated with this utterance.
38 void ExtensionTtsEngineStop(Utterance* utterance);
39
40 // Hidden/internal extension function used to allow TTS engine extensions
41 // to send events back to the client that's calling tts.speak().
42 class ExtensionTtsEngineSendTtsEventFunction : public SyncExtensionFunction {
43 private:
44 virtual ~ExtensionTtsEngineSendTtsEventFunction() {}
45 virtual bool RunImpl() OVERRIDE;
46 DECLARE_EXTENSION_FUNCTION_NAME("ttsEngine.sendTtsEvent")
47 };
48
49 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TTS_ENGINE_API_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tts_apitest.cc ('k') | chrome/browser/extensions/extension_tts_engine_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698