diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.h')
-rw-r--r-- | chromium/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/chromium/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.h b/chromium/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.h index 555f335a26d..c1eb9817ae0 100644 --- a/chromium/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.h +++ b/chromium/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.h @@ -28,20 +28,21 @@ #include "bindings/v8/ScriptWrappable.h" #include "core/dom/ContextLifecycleObserver.h" -#include "core/events/EventTarget.h" +#include "modules/EventTargetModules.h" #include "modules/speech/SpeechSynthesisVoice.h" +#include "platform/heap/Handle.h" #include "platform/speech/PlatformSpeechSynthesisUtterance.h" #include "wtf/PassRefPtr.h" -#include "wtf/RefCounted.h" namespace WebCore { -class SpeechSynthesisUtterance : public PlatformSpeechSynthesisUtteranceClient, public ScriptWrappable, public RefCounted<SpeechSynthesisUtterance>, public ContextLifecycleObserver, public EventTargetWithInlineData { - REFCOUNTED_EVENT_TARGET(SpeechSynthesisUtterance); +class SpeechSynthesisUtterance FINAL : public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<SpeechSynthesisUtterance>, public PlatformSpeechSynthesisUtteranceClient, public ScriptWrappable, public ContextLifecycleObserver, public EventTargetWithInlineData { + DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<SpeechSynthesisUtterance>); + USING_GARBAGE_COLLECTED_MIXIN(SpeechSynthesisUtterance); public: - static PassRefPtr<SpeechSynthesisUtterance> create(ExecutionContext*, const String&); + static SpeechSynthesisUtterance* create(ExecutionContext*, const String&); - ~SpeechSynthesisUtterance(); + virtual ~SpeechSynthesisUtterance(); const String& text() const { return m_platformUtterance->text(); } void setText(const String& text) { m_platformUtterance->setText(text); } @@ -72,14 +73,16 @@ public: DEFINE_ATTRIBUTE_EVENT_LISTENER(mark); DEFINE_ATTRIBUTE_EVENT_LISTENER(boundary); - virtual ExecutionContext* executionContext() const; + virtual ExecutionContext* executionContext() const OVERRIDE; - PlatformSpeechSynthesisUtterance* platformUtterance() const { return m_platformUtterance.get(); } + PlatformSpeechSynthesisUtterance* platformUtterance() const { return m_platformUtterance; } + + virtual void trace(Visitor*) OVERRIDE; private: SpeechSynthesisUtterance(ExecutionContext*, const String&); - RefPtr<PlatformSpeechSynthesisUtterance> m_platformUtterance; - RefPtr<SpeechSynthesisVoice> m_voice; + Member<PlatformSpeechSynthesisUtterance> m_platformUtterance; + Member<SpeechSynthesisVoice> m_voice; // EventTarget virtual const AtomicString& interfaceName() const OVERRIDE; |