| 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" |
| 11 #include "chrome/browser/speech/tts_controller.h" | 11 #include "chrome/browser/speech/tts_controller.h" |
| 12 #include "extensions/browser/extension_function.h" | 12 #include "extensions/browser/extension_function.h" |
| 13 | 13 |
| 14 class Utterance; | 14 class Utterance; |
| 15 | 15 |
| 16 namespace base { | |
| 17 class ListValue; | |
| 18 } | |
| 19 | |
| 20 namespace content { | 16 namespace content { |
| 21 class BrowserContext; | 17 class BrowserContext; |
| 22 } | 18 } |
| 23 | 19 |
| 24 namespace extensions { | |
| 25 class Extension; | |
| 26 } | |
| 27 | |
| 28 namespace tts_engine_events { | 20 namespace tts_engine_events { |
| 29 extern const char kOnSpeak[]; | 21 extern const char kOnSpeak[]; |
| 30 extern const char kOnStop[]; | 22 extern const char kOnStop[]; |
| 31 extern const char kOnPause[]; | 23 extern const char kOnPause[]; |
| 32 extern const char kOnResume[]; | 24 extern const char kOnResume[]; |
| 33 } | 25 } |
| 34 | 26 |
| 35 // TtsEngineDelegate implementation used by TtsController. | 27 // TtsEngineDelegate implementation used by TtsController. |
| 36 class TtsExtensionEngine : public TtsEngineDelegate { | 28 class TtsExtensionEngine : public TtsEngineDelegate { |
| 37 public: | 29 public: |
| (...skipping 13 matching lines...) Expand all Loading... |
| 51 // to send events back to the client that's calling tts.speak(). | 43 // to send events back to the client that's calling tts.speak(). |
| 52 class ExtensionTtsEngineSendTtsEventFunction | 44 class ExtensionTtsEngineSendTtsEventFunction |
| 53 : public UIThreadExtensionFunction { | 45 : public UIThreadExtensionFunction { |
| 54 private: | 46 private: |
| 55 ~ExtensionTtsEngineSendTtsEventFunction() override {} | 47 ~ExtensionTtsEngineSendTtsEventFunction() override {} |
| 56 ResponseAction Run() override; | 48 ResponseAction Run() override; |
| 57 DECLARE_EXTENSION_FUNCTION("ttsEngine.sendTtsEvent", TTSENGINE_SENDTTSEVENT) | 49 DECLARE_EXTENSION_FUNCTION("ttsEngine.sendTtsEvent", TTSENGINE_SENDTTSEVENT) |
| 58 }; | 50 }; |
| 59 | 51 |
| 60 #endif // CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_ENGINE_EXTENSION_API_H_ | 52 #endif // CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_ENGINE_EXTENSION_API_H_ |
| OLD | NEW |