Chromium Code Reviews| Index: Source/modules/speech/SpeechRecognition.h |
| diff --git a/Source/modules/speech/SpeechRecognition.h b/Source/modules/speech/SpeechRecognition.h |
| index 821f38b40b2e6ea4be08fe90768154955b81d7b0..1e887bc9a82b7c753cf0465ee95aa616494c5265 100644 |
| --- a/Source/modules/speech/SpeechRecognition.h |
| +++ b/Source/modules/speech/SpeechRecognition.h |
| @@ -29,7 +29,9 @@ |
| #include "bindings/v8/ScriptWrappable.h" |
| #include "core/dom/ActiveDOMObject.h" |
| #include "core/events/EventTarget.h" |
| +#include "heap/Handle.h" |
| #include "modules/speech/SpeechGrammarList.h" |
| +#include "modules/speech/SpeechRecognitionResult.h" |
| #include "wtf/Compiler.h" |
| #include "wtf/PassRefPtr.h" |
| #include "wtf/RefCounted.h" |
| @@ -41,18 +43,22 @@ class ExceptionState; |
| class ExecutionContext; |
| class SpeechRecognitionController; |
| class SpeechRecognitionError; |
| -class SpeechRecognitionResult; |
| -class SpeechRecognitionResultList; |
| -class SpeechRecognition FINAL : public RefCounted<SpeechRecognition>, public ScriptWrappable, public ActiveDOMObject, public EventTargetWithInlineData { |
| - REFCOUNTED_EVENT_TARGET(SpeechRecognition); |
| +class SpeechRecognition FINAL : public RefCountedWillBeRefCountedGarbageCollected<SpeechRecognition>, public ScriptWrappable, public ActiveDOMObject, public EventTargetWithInlineData { |
| + DECLARE_GC_INFO; |
| + DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<SpeechRecognition>); |
| public: |
| - static PassRefPtr<SpeechRecognition> create(ExecutionContext*); |
| + static PassRefPtrWillBeRawPtr<SpeechRecognition> create(ExecutionContext*); |
| virtual ~SpeechRecognition(); |
| // Attributes. |
| + // FIXME (oilpan transition): tidier way to express? |
|
haraken
2014/02/12 05:18:45
Use "FIXME: oilpan:". Blink doesn't use "FIXME(xxx
|
| +#if ENABLE(OILPAN) |
| + RawPtr<SpeechGrammarList> grammars() { return m_grammars.get(); } |
| +#else |
| PassRefPtr<SpeechGrammarList> grammars() { return m_grammars; } |
|
tkent
2014/02/12 04:02:06
Returning PassRefPtr looks a bug of the original c
haraken
2014/02/12 05:18:45
Yeah, let's fix this before landing this CL so tha
sof
2014/02/12 07:48:51
Good, good; switched to SpeechGrammarList*.
|
| - void setGrammars(PassRefPtr<SpeechGrammarList> grammars) { m_grammars = grammars; } |
| +#endif |
| + void setGrammars(PassRefPtrWillBeRawPtr<SpeechGrammarList> grammars) { m_grammars = grammars; } |
| String lang() { return m_lang; } |
| void setLang(const String& lang) { m_lang = lang; } |
| bool continuous() { return m_continuous; } |
| @@ -99,12 +105,14 @@ public: |
| DEFINE_ATTRIBUTE_EVENT_LISTENER(start); |
| DEFINE_ATTRIBUTE_EVENT_LISTENER(end); |
| + void trace(Visitor*); |
| + |
| private: |
| friend class RefCounted<SpeechRecognition>; |
| explicit SpeechRecognition(ExecutionContext*); |
| - RefPtr<SpeechGrammarList> m_grammars; |
| + RefPtrWillBeMember<SpeechGrammarList> m_grammars; |
| String m_lang; |
| bool m_continuous; |
| bool m_interimResults; |