Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: Source/web/SpeechRecognitionClientProxy.cpp

Issue 843683005: Fix a bit of C++11 in web/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698