This source file includes following definitions.
- assign
- reset
- text
- lang
- voice
- volume
- rate
- pitch
- startTime
#include "config.h"
#include "public/platform/WebSpeechSynthesisUtterance.h"
#include "platform/speech/PlatformSpeechSynthesisUtterance.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
using namespace WebCore;
namespace blink {
WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance(const PassRefPtr<PlatformSpeechSynthesisUtterance>& utterance)
: m_private(utterance)
{
}
WebSpeechSynthesisUtterance& WebSpeechSynthesisUtterance::operator=(WebCore::PlatformSpeechSynthesisUtterance* utterance)
{
m_private = utterance;
return *this;
}
void WebSpeechSynthesisUtterance::assign(const WebSpeechSynthesisUtterance& other)
{
m_private = other.m_private;
}
void WebSpeechSynthesisUtterance::reset()
{
m_private.reset();
}
WebSpeechSynthesisUtterance::operator PassRefPtr<PlatformSpeechSynthesisUtterance>() const
{
return m_private.get();
}
WebSpeechSynthesisUtterance::operator PlatformSpeechSynthesisUtterance*() const
{
return m_private.get();
}
WebString WebSpeechSynthesisUtterance::text() const
{
return m_private->text();
}
WebString WebSpeechSynthesisUtterance::lang() const
{
return m_private->lang();
}
WebString WebSpeechSynthesisUtterance::voice() const
{
return m_private->voice() ? WebString(m_private->voice()->name()) : WebString();
}
float WebSpeechSynthesisUtterance::volume() const
{
return m_private->volume();
}
float WebSpeechSynthesisUtterance::rate() const
{
return m_private->rate();
}
float WebSpeechSynthesisUtterance::pitch() const
{
return m_private->pitch();
}
double WebSpeechSynthesisUtterance::startTime() const
{
return m_private->startTime();
}
}