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 20 matching lines...) Expand all Loading... |
31 #include "wtf/RefCounted.h" | 31 #include "wtf/RefCounted.h" |
32 #include "wtf/Vector.h" | 32 #include "wtf/Vector.h" |
33 | 33 |
34 namespace WebCore { | 34 namespace WebCore { |
35 | 35 |
36 class SpeechRecognitionResult : public ScriptWrappable, public RefCounted<Speech
RecognitionResult> { | 36 class SpeechRecognitionResult : public ScriptWrappable, public RefCounted<Speech
RecognitionResult> { |
37 public: | 37 public: |
38 ~SpeechRecognitionResult(); | 38 ~SpeechRecognitionResult(); |
39 static PassRefPtr<SpeechRecognitionResult> create(const Vector<RefPtr<Speech
RecognitionAlternative> >&, bool final); | 39 static PassRefPtr<SpeechRecognitionResult> create(const Vector<RefPtr<Speech
RecognitionAlternative> >&, bool final); |
40 | 40 |
41 unsigned long length() { return m_alternatives.size(); } | 41 unsigned length() { return m_alternatives.size(); } |
42 SpeechRecognitionAlternative* item(unsigned long index); | 42 SpeechRecognitionAlternative* item(unsigned long index); |
43 bool isFinal() { return m_final; } | 43 bool isFinal() { return m_final; } |
44 | 44 |
45 private: | 45 private: |
46 SpeechRecognitionResult(const Vector<RefPtr<SpeechRecognitionAlternative> >&
, bool final); | 46 SpeechRecognitionResult(const Vector<RefPtr<SpeechRecognitionAlternative> >&
, bool final); |
47 | 47 |
48 Vector<RefPtr<SpeechRecognitionAlternative> > m_alternatives; | 48 Vector<RefPtr<SpeechRecognitionAlternative> > m_alternatives; |
49 bool m_final; | 49 bool m_final; |
50 }; | 50 }; |
51 | 51 |
52 } // namespace WebCore | 52 } // namespace WebCore |
53 | 53 |
54 #endif // SpeechRecognitionResult_h | 54 #endif // SpeechRecognitionResult_h |
OLD | NEW |