OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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 CONTENT_PUBLIC_BROWSER_TTS_DISPATCHER_HOST_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_TTS_DISPATCHER_HOST_H_ |
| 7 |
| 8 #include "content/common/content_export.h" |
| 9 #include "content/public/common/tts_utterance_request.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 class BrowserContext; |
| 14 class TtsDispatcherHost; |
| 15 |
| 16 class CONTENT_EXPORT TtsDispatcherHostDelegate { |
| 17 public: |
| 18 virtual void OnInitializeVoiceList(TtsDispatcherHost* dispatcher_host) = 0; |
| 19 virtual void OnSpeak(TtsDispatcherHost* dispatcher_host, |
| 20 const TtsUtteranceRequest& request) = 0; |
| 21 virtual void OnPause(TtsDispatcherHost* dispatcher_host) = 0; |
| 22 virtual void OnResume(TtsDispatcherHost* dispatcher_host) = 0; |
| 23 virtual void OnCancel(TtsDispatcherHost* dispatcher_host) = 0; |
| 24 }; |
| 25 |
| 26 class CONTENT_EXPORT TtsDispatcherHost { |
| 27 public: |
| 28 TtsDispatcherHost() {} |
| 29 virtual ~TtsDispatcherHost() {} |
| 30 |
| 31 virtual BrowserContext* GetBrowserContext() = 0; |
| 32 |
| 33 virtual void DidStartSpeaking(int utterance_id) = 0; |
| 34 virtual void DidFinishSpeaking(int utterance_id) = 0; |
| 35 virtual void DidPauseSpeaking(int utterance_id) = 0; |
| 36 virtual void DidResumeSpeaking(int utterance_id) = 0; |
| 37 virtual void WordBoundary(int utterance_id, int char_index) = 0; |
| 38 virtual void SentenceBoundary(int utterance_id, int char_index) = 0; |
| 39 virtual void MarkerEvent(int utterance_id, int char_index) = 0; |
| 40 virtual void WasInterrupted(int utterance_id) = 0; |
| 41 virtual void WasCancelled(int utterance_id) = 0; |
| 42 virtual void SpeakingErrorOccurred( |
| 43 int utterance_id, const std::string& error_message) = 0; |
| 44 virtual void SendVoiceList(const std::vector<content::TtsVoice>&) = 0; |
| 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(TtsDispatcherHost); |
| 47 }; |
| 48 |
| 49 } // namespace content |
| 50 |
| 51 #endif // CONTENT_PUBLIC_BROWSER_TTS_DISPATCHER_HOST_H_ |
OLD | NEW |