Index: Source/platform/speech/PlatformSpeechSynthesizer.cpp |
diff --git a/Source/platform/speech/PlatformSpeechSynthesizer.cpp b/Source/platform/speech/PlatformSpeechSynthesizer.cpp |
index e52128d2750b77f00c41bc00f9405e3ff4e42c4c..74d886f9a21634e6e60dee6a2a4b5d55a22b3bf1 100644 |
--- a/Source/platform/speech/PlatformSpeechSynthesizer.cpp |
+++ b/Source/platform/speech/PlatformSpeechSynthesizer.cpp |
@@ -36,25 +36,25 @@ |
namespace WebCore { |
-PassOwnPtr<PlatformSpeechSynthesizer> PlatformSpeechSynthesizer::create(PlatformSpeechSynthesizerClient* client) |
+PlatformSpeechSynthesizer* PlatformSpeechSynthesizer::create(PlatformSpeechSynthesizerClient* client) |
{ |
- OwnPtr<PlatformSpeechSynthesizer> synthesizer = adoptPtr(new PlatformSpeechSynthesizer(client)); |
+ PlatformSpeechSynthesizer* synthesizer = new PlatformSpeechSynthesizer(client); |
synthesizer->initializeVoiceList(); |
- return synthesizer.release(); |
+ return synthesizer; |
} |
PlatformSpeechSynthesizer::PlatformSpeechSynthesizer(PlatformSpeechSynthesizerClient* client) |
: m_speechSynthesizerClient(client) |
{ |
- m_webSpeechSynthesizerClient = adoptPtr(new WebSpeechSynthesizerClientImpl(this, client)); |
- m_webSpeechSynthesizer = adoptPtr(blink::Platform::current()->createSpeechSynthesizer(m_webSpeechSynthesizerClient.get())); |
+ m_webSpeechSynthesizerClient = new WebSpeechSynthesizerClientImpl(this, client); |
+ m_webSpeechSynthesizer = adoptPtr(blink::Platform::current()->createSpeechSynthesizer(m_webSpeechSynthesizerClient)); |
} |
PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer() |
{ |
} |
-void PlatformSpeechSynthesizer::speak(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance) |
+void PlatformSpeechSynthesizer::speak(PlatformSpeechSynthesisUtterance* utterance) |
{ |
if (!m_webSpeechSynthesizer || !m_webSpeechSynthesizerClient) |
return; |
@@ -80,7 +80,7 @@ void PlatformSpeechSynthesizer::cancel() |
m_webSpeechSynthesizer->cancel(); |
} |
-void PlatformSpeechSynthesizer::setVoiceList(Vector<RefPtr<PlatformSpeechSynthesisVoice> >& voices) |
+void PlatformSpeechSynthesizer::setVoiceList(HeapVector<Member<PlatformSpeechSynthesisVoice> >& voices) |
{ |
m_voiceList = voices; |
} |
@@ -91,4 +91,11 @@ void PlatformSpeechSynthesizer::initializeVoiceList() |
m_webSpeechSynthesizer->updateVoiceList(); |
} |
+void PlatformSpeechSynthesizer::trace(Visitor* visitor) |
+{ |
+ visitor->trace(m_speechSynthesizerClient); |
+ visitor->trace(m_voiceList); |
+ visitor->trace(m_webSpeechSynthesizerClient); |
+} |
+ |
} // namespace WebCore |