Fix build break
[chromium-blink-merge.git] / chrome / browser / speech / extension_api / tts_extension_api.h
blob6d5b4eea6a154f99f8fb1f51bc0d4a73c5aef7cd
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_EXTENSION_API_H_
6 #define CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_EXTENSION_API_H_
8 #include <string>
10 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
11 #include "chrome/browser/extensions/extension_function.h"
12 #include "chrome/browser/speech/tts_controller.h"
14 class Profile;
16 namespace extensions {
18 class TtsSpeakFunction
19 : public AsyncExtensionFunction {
20 private:
21 virtual ~TtsSpeakFunction() {}
22 virtual bool RunImpl() OVERRIDE;
23 DECLARE_EXTENSION_FUNCTION("tts.speak", TTS_SPEAK)
26 class TtsStopSpeakingFunction : public SyncExtensionFunction {
27 private:
28 virtual ~TtsStopSpeakingFunction() {}
29 virtual bool RunImpl() OVERRIDE;
30 DECLARE_EXTENSION_FUNCTION("tts.stop", TTS_STOP)
33 class TtsIsSpeakingFunction : public SyncExtensionFunction {
34 private:
35 virtual ~TtsIsSpeakingFunction() {}
36 virtual bool RunImpl() OVERRIDE;
37 DECLARE_EXTENSION_FUNCTION("tts.isSpeaking", TTS_ISSPEAKING)
40 class TtsGetVoicesFunction : public SyncExtensionFunction {
41 private:
42 virtual ~TtsGetVoicesFunction() {}
43 virtual bool RunImpl() OVERRIDE;
44 DECLARE_EXTENSION_FUNCTION("tts.getVoices", TTS_GETVOICES)
47 class TtsAPI : public ProfileKeyedAPI {
48 public:
49 explicit TtsAPI(Profile* profile);
50 virtual ~TtsAPI();
52 // Convenience method to get the TtsAPI for a profile.
53 static TtsAPI* Get(Profile* profile);
55 // ProfileKeyedAPI implementation.
56 static ProfileKeyedAPIFactory<TtsAPI>* GetFactoryInstance();
58 private:
59 friend class ProfileKeyedAPIFactory<TtsAPI>;
61 // ProfileKeyedAPI implementation.
62 static const char* service_name() {
63 return "TtsAPI";
65 static const bool kServiceIsNULLWhileTesting = true;
68 } // namespace extensions
70 #endif // CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_EXTENSION_API_H_