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

Unified Diff: Source/modules/speech/testing/PlatformSpeechSynthesizerMock.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
Index: Source/modules/speech/testing/PlatformSpeechSynthesizerMock.cpp
diff --git a/Source/modules/speech/testing/PlatformSpeechSynthesizerMock.cpp b/Source/modules/speech/testing/PlatformSpeechSynthesizerMock.cpp
index b1620c26c93f595b8933e7efc54144d0edfa67aa..a5e36e50636f97dc705e32dbcabdbe67af1ef61f 100644
--- a/Source/modules/speech/testing/PlatformSpeechSynthesizerMock.cpp
+++ b/Source/modules/speech/testing/PlatformSpeechSynthesizerMock.cpp
@@ -31,12 +31,12 @@
namespace WebCore {
-PassOwnPtr<PlatformSpeechSynthesizerMock> PlatformSpeechSynthesizerMock::create(PlatformSpeechSynthesizerClient* client)
+PlatformSpeechSynthesizerMock* PlatformSpeechSynthesizerMock::create(PlatformSpeechSynthesizerClient* client)
{
- OwnPtr<PlatformSpeechSynthesizerMock> synthesizer = adoptPtr(new PlatformSpeechSynthesizerMock(client));
+ PlatformSpeechSynthesizerMock* synthesizer = new PlatformSpeechSynthesizerMock(client);
synthesizer->initializeVoiceList();
client->voicesDidChange();
- return synthesizer.release();
+ return synthesizer;
}
PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock(PlatformSpeechSynthesizerClient* client)
@@ -74,7 +74,7 @@ void PlatformSpeechSynthesizerMock::initializeVoiceList()
m_voiceList.append(PlatformSpeechSynthesisVoice::create(String("mock.voice.logan"), String("logan"), String("fr-CA"), true, true));
}
-void PlatformSpeechSynthesizerMock::speak(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
+void PlatformSpeechSynthesizerMock::speak(PlatformSpeechSynthesisUtterance* utterance)
{
ASSERT(!m_utterance);
m_utterance = utterance;
@@ -107,5 +107,10 @@ void PlatformSpeechSynthesizerMock::resume()
client()->didResumeSpeaking(m_utterance);
}
+void PlatformSpeechSynthesizerMock::trace(Visitor* visitor)
+{
+ visitor->trace(m_utterance);
+ PlatformSpeechSynthesizer::trace(visitor);
+}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698