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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 unsigned long resultIndex; | 44 unsigned long resultIndex; |
45 RefPtrWillBeMember<SpeechRecognitionResultList> results; | 45 RefPtrWillBeMember<SpeechRecognitionResultList> results; |
46 }; | 46 }; |
47 | 47 |
48 class SpeechRecognitionEvent FINAL : public Event { | 48 class SpeechRecognitionEvent FINAL : public Event { |
49 public: | 49 public: |
50 static PassRefPtrWillBeRawPtr<SpeechRecognitionEvent> create(); | 50 static PassRefPtrWillBeRawPtr<SpeechRecognitionEvent> create(); |
51 static PassRefPtrWillBeRawPtr<SpeechRecognitionEvent> create(const AtomicStr
ing&, const SpeechRecognitionEventInit&); | 51 static PassRefPtrWillBeRawPtr<SpeechRecognitionEvent> create(const AtomicStr
ing&, const SpeechRecognitionEventInit&); |
52 virtual ~SpeechRecognitionEvent(); | 52 virtual ~SpeechRecognitionEvent(); |
53 | 53 |
54 static PassRefPtr<SpeechRecognitionEvent> createResult(unsigned long resultI
ndex, const WillBeHeapVector<RefPtrWillBeMember<SpeechRecognitionResult> >& resu
lts); | 54 static PassRefPtrWillBeRawPtr<SpeechRecognitionEvent> createResult(unsigned
long resultIndex, const WillBeHeapVector<RefPtrWillBeMember<SpeechRecognitionRes
ult> >& results); |
55 static PassRefPtr<SpeechRecognitionEvent> createNoMatch(PassRefPtrWillBeRawP
tr<SpeechRecognitionResult>); | 55 static PassRefPtrWillBeRawPtr<SpeechRecognitionEvent> createNoMatch(PassRefP
trWillBeRawPtr<SpeechRecognitionResult>); |
56 | 56 |
57 unsigned long resultIndex() const { return m_resultIndex; } | 57 unsigned long resultIndex() const { return m_resultIndex; } |
58 SpeechRecognitionResultList* results() const { return m_results.get(); } | 58 SpeechRecognitionResultList* results() const { return m_results.get(); } |
59 | 59 |
60 // These two methods are here to satisfy the specification which requires th
ese attrubutes to exist. | 60 // These two methods are here to satisfy the specification which requires th
ese attrubutes to exist. |
61 Document* interpretation() { return 0; } | 61 Document* interpretation() { return 0; } |
62 Document* emma() { return 0; } | 62 Document* emma() { return 0; } |
63 | 63 |
64 // Event | 64 // Event |
65 virtual const AtomicString& interfaceName() const OVERRIDE; | 65 virtual const AtomicString& interfaceName() const OVERRIDE; |
66 | 66 |
67 virtual void trace(Visitor*) OVERRIDE; | 67 virtual void trace(Visitor*) OVERRIDE; |
68 | 68 |
69 private: | 69 private: |
70 SpeechRecognitionEvent(); | 70 SpeechRecognitionEvent(); |
71 SpeechRecognitionEvent(const AtomicString&, const SpeechRecognitionEventInit
&); | 71 SpeechRecognitionEvent(const AtomicString&, const SpeechRecognitionEventInit
&); |
72 SpeechRecognitionEvent(const AtomicString& eventName, unsigned long resultIn
dex, PassRefPtrWillBeRawPtr<SpeechRecognitionResultList> results); | 72 SpeechRecognitionEvent(const AtomicString& eventName, unsigned long resultIn
dex, PassRefPtrWillBeRawPtr<SpeechRecognitionResultList> results); |
73 | 73 |
74 unsigned long m_resultIndex; | 74 unsigned long m_resultIndex; |
75 RefPtrWillBeMember<SpeechRecognitionResultList> m_results; | 75 RefPtrWillBeMember<SpeechRecognitionResultList> m_results; |
76 }; | 76 }; |
77 | 77 |
78 } // namespace WebCore | 78 } // namespace WebCore |
79 | 79 |
80 #endif // SpeechRecognitionEvent_h | 80 #endif // SpeechRecognitionEvent_h |
OLD | NEW |