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

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

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/platform/speech/PlatformSpeechSynthesizer.h
diff --git a/Source/platform/speech/PlatformSpeechSynthesizer.h b/Source/platform/speech/PlatformSpeechSynthesizer.h
index 603ab6c1e194aba220fcfd1130ca3c6faab4ec9f..00209ba39df0ea828556624481380b305ca13526 100644
--- a/Source/platform/speech/PlatformSpeechSynthesizer.h
+++ b/Source/platform/speech/PlatformSpeechSynthesizer.h
@@ -27,8 +27,8 @@
#define PlatformSpeechSynthesizer_h
#include "platform/PlatformExport.h"
+#include "platform/heap/Handle.h"
#include "platform/speech/PlatformSpeechSynthesisVoice.h"
-#include "wtf/PassOwnPtr.h"
#include "wtf/Vector.h"
namespace blink {
@@ -44,47 +44,54 @@ enum SpeechBoundary {
};
class PlatformSpeechSynthesisUtterance;
+class WebSpeechSynthesizerClientImpl;
-class PlatformSpeechSynthesizerClient {
+class PlatformSpeechSynthesizerClient : public GarbageCollectedMixin {
public:
- virtual void didStartSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
- virtual void didFinishSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
- virtual void didPauseSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
- virtual void didResumeSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
- virtual void speakingErrorOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
- virtual void boundaryEventOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance>, SpeechBoundary, unsigned charIndex) = 0;
+ virtual void didStartSpeaking(PlatformSpeechSynthesisUtterance*) = 0;
+ virtual void didFinishSpeaking(PlatformSpeechSynthesisUtterance*) = 0;
+ virtual void didPauseSpeaking(PlatformSpeechSynthesisUtterance*) = 0;
+ virtual void didResumeSpeaking(PlatformSpeechSynthesisUtterance*) = 0;
+ virtual void speakingErrorOccurred(PlatformSpeechSynthesisUtterance*) = 0;
+ virtual void boundaryEventOccurred(PlatformSpeechSynthesisUtterance*, SpeechBoundary, unsigned charIndex) = 0;
virtual void voicesDidChange() = 0;
+
+ virtual void trace(Visitor*) { }
protected:
virtual ~PlatformSpeechSynthesizerClient() { }
};
-class PLATFORM_EXPORT PlatformSpeechSynthesizer {
+class PLATFORM_EXPORT PlatformSpeechSynthesizer : public GarbageCollectedFinalized<PlatformSpeechSynthesizer> {
WTF_MAKE_NONCOPYABLE(PlatformSpeechSynthesizer);
public:
- static PassOwnPtr<PlatformSpeechSynthesizer> create(PlatformSpeechSynthesizerClient*);
+ static PlatformSpeechSynthesizer* create(PlatformSpeechSynthesizerClient*);
virtual ~PlatformSpeechSynthesizer();
- const Vector<RefPtr<PlatformSpeechSynthesisVoice> >& voiceList() const { return m_voiceList; }
- virtual void speak(PassRefPtr<PlatformSpeechSynthesisUtterance>);
+ const HeapVector<Member<PlatformSpeechSynthesisVoice> >& voiceList() const { return m_voiceList; }
+ virtual void speak(PlatformSpeechSynthesisUtterance*);
virtual void pause();
virtual void resume();
virtual void cancel();
PlatformSpeechSynthesizerClient* client() const { return m_speechSynthesizerClient; }
- void setVoiceList(Vector<RefPtr<PlatformSpeechSynthesisVoice> >&);
+ void setVoiceList(HeapVector<Member<PlatformSpeechSynthesisVoice> >&);
+
+ virtual void trace(Visitor*);
protected:
- virtual void initializeVoiceList();
explicit PlatformSpeechSynthesizer(PlatformSpeechSynthesizerClient*);
- Vector<RefPtr<PlatformSpeechSynthesisVoice> > m_voiceList;
+
+ virtual void initializeVoiceList();
+
+ HeapVector<Member<PlatformSpeechSynthesisVoice> > m_voiceList;
private:
- PlatformSpeechSynthesizerClient* m_speechSynthesizerClient;
+ Member<PlatformSpeechSynthesizerClient> m_speechSynthesizerClient;
OwnPtr<blink::WebSpeechSynthesizer> m_webSpeechSynthesizer;
- OwnPtr<blink::WebSpeechSynthesizerClient> m_webSpeechSynthesizerClient;
+ Member<WebCore::WebSpeechSynthesizerClientImpl> m_webSpeechSynthesizerClient;
};
} // namespace WebCore
« no previous file with comments | « Source/platform/speech/PlatformSpeechSynthesisVoice.cpp ('k') | Source/platform/speech/PlatformSpeechSynthesizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698