Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1184)

Unified Diff: Source/platform/speech/PlatformSpeechSynthesizer.cpp

Issue 339823003: Oilpan: move platform speech objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Trace SpeechRecognition's controller reference. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/speech/PlatformSpeechSynthesizer.h ('k') | public/platform/WebSpeechSynthesisUtterance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/platform/speech/PlatformSpeechSynthesizer.h ('k') | public/platform/WebSpeechSynthesisUtterance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698