OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TTS_CONTROLLER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_SPEECH_TTS_CONTROLLER_IMPL_H_ |
6 #define CHROME_BROWSER_SPEECH_TTS_CONTROLLER_IMPL_H_ | 6 #define CHROME_BROWSER_SPEECH_TTS_CONTROLLER_IMPL_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/singleton.h" | 14 #include "base/memory/singleton.h" |
15 #include "base/memory/weak_ptr.h" | |
16 #include "chrome/browser/speech/tts_controller.h" | 15 #include "chrome/browser/speech/tts_controller.h" |
17 #include "url/gurl.h" | 16 #include "url/gurl.h" |
18 | 17 |
19 namespace content { | 18 namespace content { |
20 class BrowserContext; | 19 class BrowserContext; |
21 } | 20 } |
22 | 21 |
23 // Singleton class that manages text-to-speech for the TTS and TTS engine | 22 // Singleton class that manages text-to-speech for the TTS and TTS engine |
24 // extension APIs, maintaining a queue of pending utterances and keeping | 23 // extension APIs, maintaining a queue of pending utterances and keeping |
25 // track of all state. | 24 // track of all state. |
(...skipping 10 matching lines...) Expand all Loading... |
36 void Resume() override; | 35 void Resume() override; |
37 void OnTtsEvent(int utterance_id, | 36 void OnTtsEvent(int utterance_id, |
38 TtsEventType event_type, | 37 TtsEventType event_type, |
39 int char_index, | 38 int char_index, |
40 const std::string& error_message) override; | 39 const std::string& error_message) override; |
41 void GetVoices(content::BrowserContext* browser_context, | 40 void GetVoices(content::BrowserContext* browser_context, |
42 std::vector<VoiceData>* out_voices) override; | 41 std::vector<VoiceData>* out_voices) override; |
43 void VoicesChanged() override; | 42 void VoicesChanged() override; |
44 void AddVoicesChangedDelegate(VoicesChangedDelegate* delegate) override; | 43 void AddVoicesChangedDelegate(VoicesChangedDelegate* delegate) override; |
45 void RemoveVoicesChangedDelegate(VoicesChangedDelegate* delegate) override; | 44 void RemoveVoicesChangedDelegate(VoicesChangedDelegate* delegate) override; |
| 45 void RemoveUtteranceEventDelegate(UtteranceEventDelegate* delegate) override; |
46 void SetTtsEngineDelegate(TtsEngineDelegate* delegate) override; | 46 void SetTtsEngineDelegate(TtsEngineDelegate* delegate) override; |
47 TtsEngineDelegate* GetTtsEngineDelegate() override; | 47 TtsEngineDelegate* GetTtsEngineDelegate() override; |
48 void SetPlatformImpl(TtsPlatformImpl* platform_impl) override; | 48 void SetPlatformImpl(TtsPlatformImpl* platform_impl) override; |
49 int QueueSize() override; | 49 int QueueSize() override; |
50 | 50 |
51 protected: | 51 protected: |
52 TtsControllerImpl(); | 52 TtsControllerImpl(); |
53 ~TtsControllerImpl() override; | 53 ~TtsControllerImpl() override; |
54 | 54 |
55 private: | 55 private: |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // dependency injection. | 93 // dependency injection. |
94 TtsPlatformImpl* platform_impl_; | 94 TtsPlatformImpl* platform_impl_; |
95 | 95 |
96 // The delegate that processes TTS requests with user-installed extensions. | 96 // The delegate that processes TTS requests with user-installed extensions. |
97 TtsEngineDelegate* tts_engine_delegate_; | 97 TtsEngineDelegate* tts_engine_delegate_; |
98 | 98 |
99 DISALLOW_COPY_AND_ASSIGN(TtsControllerImpl); | 99 DISALLOW_COPY_AND_ASSIGN(TtsControllerImpl); |
100 }; | 100 }; |
101 | 101 |
102 #endif // CHROME_BROWSER_SPEECH_TTS_CONTROLLER_IMPL_H_ | 102 #endif // CHROME_BROWSER_SPEECH_TTS_CONTROLLER_IMPL_H_ |
OLD | NEW |