This source file includes following definitions.
- m_client
- setVoiceList
- didStartSpeaking
- didFinishSpeaking
- didPauseSpeaking
- didResumeSpeaking
- speakingErrorOccurred
- wordBoundaryEventOccurred
- sentenceBoundaryEventOccurred
#include "config.h"
#include "platform/exported/WebSpeechSynthesizerClientImpl.h"
#include "platform/speech/PlatformSpeechSynthesisUtterance.h"
namespace WebCore {
WebSpeechSynthesizerClientImpl::WebSpeechSynthesizerClientImpl(PlatformSpeechSynthesizer* synthesizer, PlatformSpeechSynthesizerClient* client)
: m_synthesizer(synthesizer)
, m_client(client)
{
}
WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl()
{
}
void WebSpeechSynthesizerClientImpl::setVoiceList(const blink::WebVector<blink::WebSpeechSynthesisVoice>& voices)
{
Vector<RefPtr<PlatformSpeechSynthesisVoice> > outVoices;
for (size_t i = 0; i < voices.size(); i++)
outVoices.append(PassRefPtr<PlatformSpeechSynthesisVoice>(voices[i]));
m_synthesizer->setVoiceList(outVoices);
m_client->voicesDidChange();
}
void WebSpeechSynthesizerClientImpl::didStartSpeaking(const blink::WebSpeechSynthesisUtterance& utterance)
{
m_client->didStartSpeaking(utterance);
}
void WebSpeechSynthesizerClientImpl::didFinishSpeaking(const blink::WebSpeechSynthesisUtterance& utterance)
{
m_client->didFinishSpeaking(utterance);
}
void WebSpeechSynthesizerClientImpl::didPauseSpeaking(const blink::WebSpeechSynthesisUtterance& utterance)
{
m_client->didPauseSpeaking(utterance);
}
void WebSpeechSynthesizerClientImpl::didResumeSpeaking(const blink::WebSpeechSynthesisUtterance& utterance)
{
m_client->didResumeSpeaking(utterance);
}
void WebSpeechSynthesizerClientImpl::speakingErrorOccurred(const blink::WebSpeechSynthesisUtterance& utterance)
{
m_client->speakingErrorOccurred(utterance);
}
void WebSpeechSynthesizerClientImpl::wordBoundaryEventOccurred(const blink::WebSpeechSynthesisUtterance& utterance, unsigned charIndex)
{
m_client->boundaryEventOccurred(utterance, SpeechWordBoundary, charIndex);
}
void WebSpeechSynthesizerClientImpl::sentenceBoundaryEventOccurred(const blink::WebSpeechSynthesisUtterance& utterance, unsigned charIndex)
{
m_client->boundaryEventOccurred(utterance, SpeechSentenceBoundary, charIndex);
}
}