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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
95 } | 95 } |
96 | 96 |
97 void SpeechRecognitionClientProxy::didEndAudio(const WebSpeechRecognitionHandle& handle) | 97 void SpeechRecognitionClientProxy::didEndAudio(const WebSpeechRecognitionHandle& handle) |
98 { | 98 { |
99 RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle ); | 99 RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle ); |
100 recognition->didEndAudio(); | 100 recognition->didEndAudio(); |
101 } | 101 } |
102 | 102 |
103 void SpeechRecognitionClientProxy::didReceiveResults(const WebSpeechRecognitionH andle& handle, const WebVector<WebSpeechRecognitionResult>& newFinalResults, con st WebVector<WebSpeechRecognitionResult>& currentInterimResults) | 103 void SpeechRecognitionClientProxy::didReceiveResults(const WebSpeechRecognitionH andle& handle, const WebVector<WebSpeechRecognitionResult>& newFinalResults, con st WebVector<WebSpeechRecognitionResult>& currentInterimResults) |
104 { | 104 { |
105 RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle ); | 105 RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle ); |
haraken
2014/02/17 09:04:57
Shouldn't this be RefPtrWillBeRawPtr<SpeechRecogni
| |
106 | 106 |
107 Vector<RefPtr<SpeechRecognitionResult> > finalResultsVector(newFinalResults. size()); | 107 Vector<RefPtrWillBeRawPtr<SpeechRecognitionResult> > finalResultsVector(newF inalResults.size()); |
haraken
2014/02/17 09:04:57
This should be WillBeHeapVector<RefPtrWillBeMember
| |
108 for (size_t i = 0; i < newFinalResults.size(); ++i) | 108 for (size_t i = 0; i < newFinalResults.size(); ++i) |
109 finalResultsVector[i] = static_cast<PassRefPtr<SpeechRecognitionResult> >(newFinalResults[i]); | 109 finalResultsVector[i] = static_cast<PassRefPtrWillBeRawPtr<SpeechRecogni tionResult> >(newFinalResults[i]); |
haraken
2014/02/17 09:04:57
Can we remove this cast?
| |
110 | 110 |
111 Vector<RefPtr<SpeechRecognitionResult> > interimResultsVector(currentInterim Results.size()); | 111 Vector<RefPtrWillBeRawPtr<SpeechRecognitionResult> > interimResultsVector(cu rrentInterimResults.size()); |
haraken
2014/02/17 09:04:57
This should be WillBeHeapVector<RefPtrWillBeMember
| |
112 for (size_t i = 0; i < currentInterimResults.size(); ++i) | 112 for (size_t i = 0; i < currentInterimResults.size(); ++i) |
113 interimResultsVector[i] = static_cast<PassRefPtr<SpeechRecognitionResult > >(currentInterimResults[i]); | 113 interimResultsVector[i] = static_cast<PassRefPtrWillBeRawPtr<SpeechRecog nitionResult> >(currentInterimResults[i]); |
haraken
2014/02/17 09:04:57
Can we remove this cast?
| |
114 | 114 |
115 recognition->didReceiveResults(finalResultsVector, interimResultsVector); | 115 recognition->didReceiveResults(finalResultsVector, interimResultsVector); |
116 } | 116 } |
117 | 117 |
118 void SpeechRecognitionClientProxy::didReceiveNoMatch(const WebSpeechRecognitionH andle& handle, const WebSpeechRecognitionResult& result) | 118 void SpeechRecognitionClientProxy::didReceiveNoMatch(const WebSpeechRecognitionH andle& handle, const WebSpeechRecognitionResult& result) |
119 { | 119 { |
120 RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle ); | 120 RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle ); |
121 recognition->didReceiveNoMatch(result); | 121 recognition->didReceiveNoMatch(result); |
122 } | 122 } |
123 | 123 |
(...skipping 15 matching lines...) Expand all Loading... | |
139 RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle ); | 139 RefPtr<SpeechRecognition> recognition = PassRefPtr<SpeechRecognition>(handle ); |
140 recognition->didEnd(); | 140 recognition->didEnd(); |
141 } | 141 } |
142 | 142 |
143 SpeechRecognitionClientProxy::SpeechRecognitionClientProxy(WebSpeechRecognizer* recognizer) | 143 SpeechRecognitionClientProxy::SpeechRecognitionClientProxy(WebSpeechRecognizer* recognizer) |
144 : m_recognizer(recognizer) | 144 : m_recognizer(recognizer) |
145 { | 145 { |
146 } | 146 } |
147 | 147 |
148 } // namespace blink | 148 } // namespace blink |
OLD | NEW |