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_TTS_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_SPEECH_TTS_CONTROLLER_H_ |
6 #define CHROME_BROWSER_SPEECH_TTS_CONTROLLER_H_ | 6 #define CHROME_BROWSER_SPEECH_TTS_CONTROLLER_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 // Stop speaking the given utterance by sending an event to the target | 92 // Stop speaking the given utterance by sending an event to the target |
93 // associated with this utterance. | 93 // associated with this utterance. |
94 virtual void Stop(Utterance* utterance) = 0; | 94 virtual void Stop(Utterance* utterance) = 0; |
95 | 95 |
96 // Pause in the middle of speaking this utterance. | 96 // Pause in the middle of speaking this utterance. |
97 virtual void Pause(Utterance* utterance) = 0; | 97 virtual void Pause(Utterance* utterance) = 0; |
98 | 98 |
99 // Resume speaking this utterance. | 99 // Resume speaking this utterance. |
100 virtual void Resume(Utterance* utterance) = 0; | 100 virtual void Resume(Utterance* utterance) = 0; |
| 101 |
| 102 // Load the built-in component extension for ChromeOS. |
| 103 virtual bool LoadBuiltInTtsExtension(Profile* profile) = 0; |
101 }; | 104 }; |
102 | 105 |
103 // Class that wants to receive events on utterances. | 106 // Class that wants to receive events on utterances. |
104 class UtteranceEventDelegate { | 107 class UtteranceEventDelegate { |
105 public: | 108 public: |
106 virtual ~UtteranceEventDelegate() {} | 109 virtual ~UtteranceEventDelegate() {} |
107 virtual void OnTtsEvent(Utterance* utterance, | 110 virtual void OnTtsEvent(Utterance* utterance, |
108 TtsEventType event_type, | 111 TtsEventType event_type, |
109 int char_index, | 112 int char_index, |
110 const std::string& error_message) = 0; | 113 const std::string& error_message) = 0; |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 // Add a delegate that wants to be notified when the set of voices changes. | 321 // Add a delegate that wants to be notified when the set of voices changes. |
319 virtual void AddVoicesChangedDelegate(VoicesChangedDelegate* delegate) = 0; | 322 virtual void AddVoicesChangedDelegate(VoicesChangedDelegate* delegate) = 0; |
320 | 323 |
321 // Remove delegate that wants to be notified when the set of voices changes. | 324 // Remove delegate that wants to be notified when the set of voices changes. |
322 virtual void RemoveVoicesChangedDelegate(VoicesChangedDelegate* delegate) = 0; | 325 virtual void RemoveVoicesChangedDelegate(VoicesChangedDelegate* delegate) = 0; |
323 | 326 |
324 // Set the delegate that processes TTS requests with user-installed | 327 // Set the delegate that processes TTS requests with user-installed |
325 // extensions. | 328 // extensions. |
326 virtual void SetTtsEngineDelegate(TtsEngineDelegate* delegate) = 0; | 329 virtual void SetTtsEngineDelegate(TtsEngineDelegate* delegate) = 0; |
327 | 330 |
| 331 // Get the delegate that processes TTS requests with user-installed |
| 332 // extensions. |
| 333 virtual TtsEngineDelegate* GetTtsEngineDelegate() = 0; |
| 334 |
328 // For unit testing. | 335 // For unit testing. |
329 virtual void SetPlatformImpl(TtsPlatformImpl* platform_impl) = 0; | 336 virtual void SetPlatformImpl(TtsPlatformImpl* platform_impl) = 0; |
330 virtual int QueueSize() = 0; | 337 virtual int QueueSize() = 0; |
331 | 338 |
332 protected: | 339 protected: |
333 virtual ~TtsController() {} | 340 virtual ~TtsController() {} |
334 }; | 341 }; |
335 | 342 |
336 #endif // CHROME_BROWSER_SPEECH_TTS_CONTROLLER_H_ | 343 #endif // CHROME_BROWSER_SPEECH_TTS_CONTROLLER_H_ |
OLD | NEW |