| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 void SpeechRecognitionClientProxy::didEndAudio(const WebSpeechRecognitionHandle&
handle) | 101 void SpeechRecognitionClientProxy::didEndAudio(const WebSpeechRecognitionHandle&
handle) |
| 102 { | 102 { |
| 103 SpeechRecognition* recognition(handle); | 103 SpeechRecognition* recognition(handle); |
| 104 recognition->didEndAudio(); | 104 recognition->didEndAudio(); |
| 105 } | 105 } |
| 106 | 106 |
| 107 void SpeechRecognitionClientProxy::didReceiveResults(const WebSpeechRecognitionH
andle& handle, const WebVector<WebSpeechRecognitionResult>& newFinalResults, con
st WebVector<WebSpeechRecognitionResult>& currentInterimResults) | 107 void SpeechRecognitionClientProxy::didReceiveResults(const WebSpeechRecognitionH
andle& handle, const WebVector<WebSpeechRecognitionResult>& newFinalResults, con
st WebVector<WebSpeechRecognitionResult>& currentInterimResults) |
| 108 { | 108 { |
| 109 SpeechRecognition* recognition(handle); | 109 SpeechRecognition* recognition(handle); |
| 110 | 110 |
| 111 HeapVector<Member<SpeechRecognitionResult> > finalResultsVector(newFinalResu
lts.size()); | 111 HeapVector<Member<SpeechRecognitionResult>> finalResultsVector(newFinalResul
ts.size()); |
| 112 for (size_t i = 0; i < newFinalResults.size(); ++i) | 112 for (size_t i = 0; i < newFinalResults.size(); ++i) |
| 113 finalResultsVector[i] = Member<SpeechRecognitionResult>(newFinalResults[
i]); | 113 finalResultsVector[i] = Member<SpeechRecognitionResult>(newFinalResults[
i]); |
| 114 | 114 |
| 115 HeapVector<Member<SpeechRecognitionResult> > interimResultsVector(currentInt
erimResults.size()); | 115 HeapVector<Member<SpeechRecognitionResult>> interimResultsVector(currentInte
rimResults.size()); |
| 116 for (size_t i = 0; i < currentInterimResults.size(); ++i) | 116 for (size_t i = 0; i < currentInterimResults.size(); ++i) |
| 117 interimResultsVector[i] = Member<SpeechRecognitionResult>(currentInterim
Results[i]); | 117 interimResultsVector[i] = Member<SpeechRecognitionResult>(currentInterim
Results[i]); |
| 118 | 118 |
| 119 recognition->didReceiveResults(finalResultsVector, interimResultsVector); | 119 recognition->didReceiveResults(finalResultsVector, interimResultsVector); |
| 120 } | 120 } |
| 121 | 121 |
| 122 void SpeechRecognitionClientProxy::didReceiveNoMatch(const WebSpeechRecognitionH
andle& handle, const WebSpeechRecognitionResult& result) | 122 void SpeechRecognitionClientProxy::didReceiveNoMatch(const WebSpeechRecognitionH
andle& handle, const WebSpeechRecognitionResult& result) |
| 123 { | 123 { |
| 124 SpeechRecognition* recognition(handle); | 124 SpeechRecognition* recognition(handle); |
| 125 recognition->didReceiveNoMatch(result); | 125 recognition->didReceiveNoMatch(result); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 143 SpeechRecognition* recognition(handle); | 143 SpeechRecognition* recognition(handle); |
| 144 recognition->didEnd(); | 144 recognition->didEnd(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 SpeechRecognitionClientProxy::SpeechRecognitionClientProxy(WebSpeechRecognizer*
recognizer) | 147 SpeechRecognitionClientProxy::SpeechRecognitionClientProxy(WebSpeechRecognizer*
recognizer) |
| 148 : m_recognizer(recognizer) | 148 : m_recognizer(recognizer) |
| 149 { | 149 { |
| 150 } | 150 } |
| 151 | 151 |
| 152 } // namespace blink | 152 } // namespace blink |
| OLD | NEW |