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

Side by Side Diff: content/browser/speech/speech_recognition_dispatcher_host.cc

Issue 11421103: Update the Speech Api to support array(s) of result items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sigh Created 8 years 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/speech/speech_recognition_dispatcher_host.h" 5 #include "content/browser/speech/speech_recognition_dispatcher_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "content/common/speech_recognition_messages.h" 10 #include "content/common/speech_recognition_messages.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 context.request_id)); 158 context.request_id));
159 } 159 }
160 160
161 void SpeechRecognitionDispatcherHost::OnRecognitionEnd(int session_id) { 161 void SpeechRecognitionDispatcherHost::OnRecognitionEnd(int session_id) {
162 const SpeechRecognitionSessionContext& context = 162 const SpeechRecognitionSessionContext& context =
163 manager()->GetSessionContext(session_id); 163 manager()->GetSessionContext(session_id);
164 Send(new SpeechRecognitionMsg_Ended(context.render_view_id, 164 Send(new SpeechRecognitionMsg_Ended(context.render_view_id,
165 context.request_id)); 165 context.request_id));
166 } 166 }
167 167
168 void SpeechRecognitionDispatcherHost::OnRecognitionResult( 168 void SpeechRecognitionDispatcherHost::OnRecognitionResults(
169 int session_id, 169 int session_id,
170 const SpeechRecognitionResult& result) { 170 const SpeechRecognitionResults& results) {
171 const SpeechRecognitionSessionContext& context = 171 const SpeechRecognitionSessionContext& context =
172 manager()->GetSessionContext(session_id); 172 manager()->GetSessionContext(session_id);
173 Send(new SpeechRecognitionMsg_ResultRetrieved(context.render_view_id, 173 Send(new SpeechRecognitionMsg_ResultRetrieved(context.render_view_id,
174 context.request_id, 174 context.request_id,
175 result)); 175 results));
176 } 176 }
177 177
178 void SpeechRecognitionDispatcherHost::OnRecognitionError( 178 void SpeechRecognitionDispatcherHost::OnRecognitionError(
179 int session_id, 179 int session_id,
180 const SpeechRecognitionError& error) { 180 const SpeechRecognitionError& error) {
181 const SpeechRecognitionSessionContext& context = 181 const SpeechRecognitionSessionContext& context =
182 manager()->GetSessionContext(session_id); 182 manager()->GetSessionContext(session_id);
183 Send(new SpeechRecognitionMsg_ErrorOccurred(context.render_view_id, 183 Send(new SpeechRecognitionMsg_ErrorOccurred(context.render_view_id,
184 context.request_id, 184 context.request_id,
185 error)); 185 error));
186 } 186 }
187 187
188 // The events below are currently not used by speech JS APIs implementation. 188 // The events below are currently not used by speech JS APIs implementation.
189 void SpeechRecognitionDispatcherHost::OnAudioLevelsChange(int session_id, 189 void SpeechRecognitionDispatcherHost::OnAudioLevelsChange(int session_id,
190 float volume, 190 float volume,
191 float noise_volume) { 191 float noise_volume) {
192 } 192 }
193 193
194 void SpeechRecognitionDispatcherHost::OnEnvironmentEstimationComplete( 194 void SpeechRecognitionDispatcherHost::OnEnvironmentEstimationComplete(
195 int session_id) { 195 int session_id) {
196 } 196 }
197 197
198 } // namespace content 198 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/speech/speech_recognition_dispatcher_host.h ('k') | content/browser/speech/speech_recognition_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698