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 24 matching lines...) Expand all Loading... |
35 | 35 |
36 class Document; | 36 class Document; |
37 | 37 |
38 struct SpeechRecognitionEventInit : public EventInit { | 38 struct SpeechRecognitionEventInit : public EventInit { |
39 SpeechRecognitionEventInit(); | 39 SpeechRecognitionEventInit(); |
40 | 40 |
41 unsigned long resultIndex; | 41 unsigned long resultIndex; |
42 RefPtr<SpeechRecognitionResultList> results; | 42 RefPtr<SpeechRecognitionResultList> results; |
43 }; | 43 }; |
44 | 44 |
45 class SpeechRecognitionEvent : public Event { | 45 class SpeechRecognitionEvent FINAL : public Event { |
46 public: | 46 public: |
47 static PassRefPtr<SpeechRecognitionEvent> create(); | 47 static PassRefPtr<SpeechRecognitionEvent> create(); |
48 static PassRefPtr<SpeechRecognitionEvent> create(const AtomicString&, const
SpeechRecognitionEventInit&); | 48 static PassRefPtr<SpeechRecognitionEvent> create(const AtomicString&, const
SpeechRecognitionEventInit&); |
49 virtual ~SpeechRecognitionEvent(); | 49 virtual ~SpeechRecognitionEvent(); |
50 | 50 |
51 static PassRefPtr<SpeechRecognitionEvent> createResult(unsigned long resultI
ndex, const Vector<RefPtr<SpeechRecognitionResult> >& results); | 51 static PassRefPtr<SpeechRecognitionEvent> createResult(unsigned long resultI
ndex, const Vector<RefPtr<SpeechRecognitionResult> >& results); |
52 static PassRefPtr<SpeechRecognitionEvent> createNoMatch(PassRefPtr<SpeechRec
ognitionResult>); | 52 static PassRefPtr<SpeechRecognitionEvent> createNoMatch(PassRefPtr<SpeechRec
ognitionResult>); |
53 | 53 |
54 unsigned long resultIndex() const { return m_resultIndex; } | 54 unsigned long resultIndex() const { return m_resultIndex; } |
55 SpeechRecognitionResultList* results() const { return m_results.get(); } | 55 SpeechRecognitionResultList* results() const { return m_results.get(); } |
(...skipping 10 matching lines...) Expand all Loading... |
66 SpeechRecognitionEvent(const AtomicString&, const SpeechRecognitionEventInit
&); | 66 SpeechRecognitionEvent(const AtomicString&, const SpeechRecognitionEventInit
&); |
67 SpeechRecognitionEvent(const AtomicString& eventName, unsigned long resultIn
dex, PassRefPtr<SpeechRecognitionResultList> results); | 67 SpeechRecognitionEvent(const AtomicString& eventName, unsigned long resultIn
dex, PassRefPtr<SpeechRecognitionResultList> results); |
68 | 68 |
69 unsigned long m_resultIndex; | 69 unsigned long m_resultIndex; |
70 RefPtr<SpeechRecognitionResultList> m_results; | 70 RefPtr<SpeechRecognitionResultList> m_results; |
71 }; | 71 }; |
72 | 72 |
73 } // namespace WebCore | 73 } // namespace WebCore |
74 | 74 |
75 #endif // SpeechRecognitionEvent_h | 75 #endif // SpeechRecognitionEvent_h |
OLD | NEW |