| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * * Redistributions of source code must retain the above copyright | 7 * * Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * * Redistributions in binary form must reproduce the above copyright | 9 * * Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef SpeechInputResultList_h | 26 #ifndef SpeechInputResultList_h |
| 27 #define SpeechInputResultList_h | 27 #define SpeechInputResultList_h |
| 28 | 28 |
| 29 #if ENABLE(INPUT_SPEECH) | 29 #if ENABLE(INPUT_SPEECH) |
| 30 | 30 |
| 31 #include "bindings/v8/ScriptWrappable.h" | 31 #include "bindings/v8/ScriptWrappable.h" |
| 32 #include "core/speech/SpeechInputResult.h" | 32 #include "core/speech/SpeechInputResult.h" |
| 33 #include "heap/Handle.h" |
| 33 #include "wtf/PassRefPtr.h" | 34 #include "wtf/PassRefPtr.h" |
| 34 #include "wtf/RefCounted.h" | 35 #include "wtf/RefCounted.h" |
| 35 | 36 |
| 36 namespace WebCore { | 37 namespace WebCore { |
| 37 | 38 |
| 38 class SpeechInputResultList : public RefCounted<SpeechInputResultList>, public S
criptWrappable { | 39 class SpeechInputResultList : public RefCountedWillBeGarbageCollectedFinalized<S
peechInputResultList>, public ScriptWrappable { |
| 40 DECLARE_GC_INFO; |
| 39 public: | 41 public: |
| 40 static PassRefPtr<SpeechInputResultList> create(const SpeechInputResultArray
& results); | 42 static PassRefPtrWillBeRawPtr<SpeechInputResultList> create(const SpeechInpu
tResultArray& results); |
| 41 | 43 |
| 42 // Methods from the IDL. | 44 // Methods from the IDL. |
| 43 size_t length() { return m_results.size(); } | 45 size_t length() { return m_results.size(); } |
| 44 SpeechInputResult* item(unsigned index); | 46 SpeechInputResult* item(unsigned index); |
| 45 | 47 |
| 48 void trace(Visitor *); |
| 49 |
| 46 private: | 50 private: |
| 47 explicit SpeechInputResultList(const SpeechInputResultArray& results); | 51 explicit SpeechInputResultList(const SpeechInputResultArray& results); |
| 48 | 52 |
| 49 SpeechInputResultArray m_results; | 53 SpeechInputResultArray m_results; |
| 50 }; | 54 }; |
| 51 | 55 |
| 52 } // namespace WebCore | 56 } // namespace WebCore |
| 53 | 57 |
| 54 #endif // ENABLE(INPUT_SPEECH) | 58 #endif // ENABLE(INPUT_SPEECH) |
| 55 | 59 |
| 56 #endif // SpeechInputResultList_h | 60 #endif // SpeechInputResultList_h |
| OLD | NEW |