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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 ~SpeechRecognitionEvent() override; | 45 ~SpeechRecognitionEvent() override; |
46 | 46 |
47 static SpeechRecognitionEvent* createResult( | 47 static SpeechRecognitionEvent* createResult( |
48 unsigned long resultIndex, | 48 unsigned long resultIndex, |
49 const HeapVector<Member<SpeechRecognitionResult>>& results); | 49 const HeapVector<Member<SpeechRecognitionResult>>& results); |
50 static SpeechRecognitionEvent* createNoMatch(SpeechRecognitionResult*); | 50 static SpeechRecognitionEvent* createNoMatch(SpeechRecognitionResult*); |
51 | 51 |
52 unsigned long resultIndex() const { return m_resultIndex; } | 52 unsigned long resultIndex() const { return m_resultIndex; } |
53 SpeechRecognitionResultList* results() const { return m_results; } | 53 SpeechRecognitionResultList* results() const { return m_results; } |
54 | 54 |
55 // These two methods are here to satisfy the specification which requires thes
e attributes to exist. | 55 // These two methods are here to satisfy the specification which requires |
| 56 // these attributes to exist. |
56 Document* interpretation() { return nullptr; } | 57 Document* interpretation() { return nullptr; } |
57 Document* emma() { return nullptr; } | 58 Document* emma() { return nullptr; } |
58 | 59 |
59 // Event | 60 // Event |
60 const AtomicString& interfaceName() const override; | 61 const AtomicString& interfaceName() const override; |
61 | 62 |
62 DECLARE_VIRTUAL_TRACE(); | 63 DECLARE_VIRTUAL_TRACE(); |
63 | 64 |
64 private: | 65 private: |
65 SpeechRecognitionEvent(const AtomicString&, | 66 SpeechRecognitionEvent(const AtomicString&, |
66 const SpeechRecognitionEventInit&); | 67 const SpeechRecognitionEventInit&); |
67 SpeechRecognitionEvent(const AtomicString& eventName, | 68 SpeechRecognitionEvent(const AtomicString& eventName, |
68 unsigned long resultIndex, | 69 unsigned long resultIndex, |
69 SpeechRecognitionResultList* results); | 70 SpeechRecognitionResultList* results); |
70 | 71 |
71 unsigned long m_resultIndex; | 72 unsigned long m_resultIndex; |
72 Member<SpeechRecognitionResultList> m_results; | 73 Member<SpeechRecognitionResultList> m_results; |
73 }; | 74 }; |
74 | 75 |
75 } // namespace blink | 76 } // namespace blink |
76 | 77 |
77 #endif // SpeechRecognitionEvent_h | 78 #endif // SpeechRecognitionEvent_h |
OLD | NEW |