OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 14 matching lines...) Expand all Loading... |
25 | 25 |
26 #ifndef SpeechRecognitionResult_h | 26 #ifndef SpeechRecognitionResult_h |
27 #define SpeechRecognitionResult_h | 27 #define SpeechRecognitionResult_h |
28 | 28 |
29 #include "bindings/core/v8/ScriptWrappable.h" | 29 #include "bindings/core/v8/ScriptWrappable.h" |
30 #include "modules/speech/SpeechRecognitionAlternative.h" | 30 #include "modules/speech/SpeechRecognitionAlternative.h" |
31 #include "platform/heap/Handle.h" | 31 #include "platform/heap/Handle.h" |
32 | 32 |
33 namespace blink { | 33 namespace blink { |
34 | 34 |
35 class SpeechRecognitionResult FINAL : public GarbageCollectedFinalized<SpeechRec
ognitionResult>, public ScriptWrappable { | 35 class SpeechRecognitionResult FINAL : public GarbageCollected<SpeechRecognitionR
esult>, public ScriptWrappable { |
36 public: | 36 public: |
37 ~SpeechRecognitionResult(); | |
38 static SpeechRecognitionResult* create(const HeapVector<Member<SpeechRecogni
tionAlternative> >&, bool final); | 37 static SpeechRecognitionResult* create(const HeapVector<Member<SpeechRecogni
tionAlternative> >&, bool final); |
39 | 38 |
40 unsigned long length() { return m_alternatives.size(); } | 39 unsigned long length() { return m_alternatives.size(); } |
41 SpeechRecognitionAlternative* item(unsigned long index); | 40 SpeechRecognitionAlternative* item(unsigned long index); |
42 bool isFinal() { return m_final; } | 41 bool isFinal() { return m_final; } |
43 | 42 |
44 void trace(Visitor*); | 43 void trace(Visitor*); |
45 | 44 |
46 private: | 45 private: |
47 SpeechRecognitionResult(const HeapVector<Member<SpeechRecognitionAlternative
> >&, bool final); | 46 SpeechRecognitionResult(const HeapVector<Member<SpeechRecognitionAlternative
> >&, bool final); |
48 | 47 |
49 bool m_final; | 48 bool m_final; |
50 HeapVector<Member<SpeechRecognitionAlternative> > m_alternatives; | 49 HeapVector<Member<SpeechRecognitionAlternative> > m_alternatives; |
51 }; | 50 }; |
52 | 51 |
53 } // namespace blink | 52 } // namespace blink |
54 | 53 |
55 #endif // SpeechRecognitionResult_h | 54 #endif // SpeechRecognitionResult_h |
OLD | NEW |