| 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 17 matching lines...) Expand all Loading... |
| 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 GarbageCollected<SpeechRecognitionR
esult>, public ScriptWrappable { | 35 class SpeechRecognitionResult final : public GarbageCollected<SpeechRecognitionR
esult>, public ScriptWrappable { |
| 36 DEFINE_WRAPPERTYPEINFO(); | 36 DEFINE_WRAPPERTYPEINFO(); |
| 37 public: | 37 public: |
| 38 static SpeechRecognitionResult* create(const HeapVector<Member<SpeechRecogni
tionAlternative> >&, bool final); | 38 static SpeechRecognitionResult* create(const HeapVector<Member<SpeechRecogni
tionAlternative>>&, bool final); |
| 39 | 39 |
| 40 unsigned length() { return m_alternatives.size(); } | 40 unsigned length() { return m_alternatives.size(); } |
| 41 SpeechRecognitionAlternative* item(unsigned index); | 41 SpeechRecognitionAlternative* item(unsigned index); |
| 42 bool isFinal() { return m_final; } | 42 bool isFinal() { return m_final; } |
| 43 | 43 |
| 44 void trace(Visitor*); | 44 void trace(Visitor*); |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 SpeechRecognitionResult(const HeapVector<Member<SpeechRecognitionAlternative
> >&, bool final); | 47 SpeechRecognitionResult(const HeapVector<Member<SpeechRecognitionAlternative
>>&, bool final); |
| 48 | 48 |
| 49 bool m_final; | 49 bool m_final; |
| 50 HeapVector<Member<SpeechRecognitionAlternative> > m_alternatives; | 50 HeapVector<Member<SpeechRecognitionAlternative>> m_alternatives; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 } // namespace blink | 53 } // namespace blink |
| 54 | 54 |
| 55 #endif // SpeechRecognitionResult_h | 55 #endif // SpeechRecognitionResult_h |
| OLD | NEW |