Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / modules / speech / SpeechSynthesisUtterance.h
index f381ccb..850ee9b 100644 (file)
@@ -29,6 +29,7 @@
 #include "bindings/v8/ScriptWrappable.h"
 #include "core/dom/ContextLifecycleObserver.h"
 #include "core/events/EventTarget.h"
+#include "heap/Handle.h"
 #include "modules/speech/SpeechSynthesisVoice.h"
 #include "platform/speech/PlatformSpeechSynthesisUtterance.h"
 #include "wtf/PassRefPtr.h"
 
 namespace WebCore {
 
-class SpeechSynthesisUtterance FINAL : public PlatformSpeechSynthesisUtteranceClient, public ScriptWrappable, public RefCounted<SpeechSynthesisUtterance>, public ContextLifecycleObserver, public EventTargetWithInlineData {
-    REFCOUNTED_EVENT_TARGET(SpeechSynthesisUtterance);
+class SpeechSynthesisUtterance FINAL : public RefCountedWillBeRefCountedGarbageCollected<SpeechSynthesisUtterance>, public PlatformSpeechSynthesisUtteranceClient, public ScriptWrappable, public ContextLifecycleObserver, public EventTargetWithInlineData {
+    DECLARE_GC_INFO;
+    DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<SpeechSynthesisUtterance>);
 public:
-    static PassRefPtr<SpeechSynthesisUtterance> create(ExecutionContext*, const String&);
+    static PassRefPtrWillBeRawPtr<SpeechSynthesisUtterance> create(ExecutionContext*, const String&);
 
     virtual ~SpeechSynthesisUtterance();
 
@@ -76,10 +78,12 @@ public:
 
     PlatformSpeechSynthesisUtterance* platformUtterance() const { return m_platformUtterance.get(); }
 
+    void trace(Visitor*);
+
 private:
     SpeechSynthesisUtterance(ExecutionContext*, const String&);
     RefPtr<PlatformSpeechSynthesisUtterance> m_platformUtterance;
-    RefPtr<SpeechSynthesisVoice> m_voice;
+    RefPtrWillBeMember<SpeechSynthesisVoice> m_voice;
 
     // EventTarget
     virtual const AtomicString& interfaceName() const OVERRIDE;