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

Side by Side Diff: content/renderer/speech_input_dispatcher.cc

Issue 9320007: WebSpeechInputResult::set() was renamed to assign() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/renderer/speech_input_dispatcher.h" 5 #include "content/renderer/speech_input_dispatcher.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "content/common/speech_input_messages.h" 8 #include "content/common/speech_input_messages.h"
9 #include "content/renderer/render_view_impl.h" 9 #include "content/renderer/render_view_impl.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 Send(new SpeechInputHostMsg_StopRecording(routing_id(), request_id)); 82 Send(new SpeechInputHostMsg_StopRecording(routing_id(), request_id));
83 VLOG(1) << "SpeechInputDispatcher::stopRecording exit"; 83 VLOG(1) << "SpeechInputDispatcher::stopRecording exit";
84 } 84 }
85 85
86 void SpeechInputDispatcher::OnSpeechRecognitionResult( 86 void SpeechInputDispatcher::OnSpeechRecognitionResult(
87 int request_id, 87 int request_id,
88 const content::SpeechInputResult& result) { 88 const content::SpeechInputResult& result) {
89 VLOG(1) << "SpeechInputDispatcher::OnSpeechRecognitionResult enter"; 89 VLOG(1) << "SpeechInputDispatcher::OnSpeechRecognitionResult enter";
90 WebKit::WebSpeechInputResultArray webkit_result(result.hypotheses.size()); 90 WebKit::WebSpeechInputResultArray webkit_result(result.hypotheses.size());
91 for (size_t i = 0; i < result.hypotheses.size(); ++i) { 91 for (size_t i = 0; i < result.hypotheses.size(); ++i) {
92 webkit_result[i].set(result.hypotheses[i].utterance, 92 webkit_result[i].assign(result.hypotheses[i].utterance,
93 result.hypotheses[i].confidence); 93 result.hypotheses[i].confidence);
94 } 94 }
95 listener_->setRecognitionResult(request_id, webkit_result); 95 listener_->setRecognitionResult(request_id, webkit_result);
96 VLOG(1) << "SpeechInputDispatcher::OnSpeechRecognitionResult exit"; 96 VLOG(1) << "SpeechInputDispatcher::OnSpeechRecognitionResult exit";
97 } 97 }
98 98
99 void SpeechInputDispatcher::OnSpeechRecordingComplete(int request_id) { 99 void SpeechInputDispatcher::OnSpeechRecordingComplete(int request_id) {
100 VLOG(1) << "SpeechInputDispatcher::OnSpeechRecordingComplete enter"; 100 VLOG(1) << "SpeechInputDispatcher::OnSpeechRecordingComplete enter";
101 listener_->didCompleteRecording(request_id); 101 listener_->didCompleteRecording(request_id);
102 VLOG(1) << "SpeechInputDispatcher::OnSpeechRecordingComplete exit"; 102 VLOG(1) << "SpeechInputDispatcher::OnSpeechRecordingComplete exit";
(...skipping 28 matching lines...) Expand all
131 return; 131 return;
132 if (!input_element->isSpeechInputEnabled()) 132 if (!input_element->isSpeechInputEnabled())
133 return; 133 return;
134 134
135 if (input_element->getSpeechInputState() == WebInputElement::Idle) { 135 if (input_element->getSpeechInputState() == WebInputElement::Idle) {
136 input_element->startSpeechInput(); 136 input_element->startSpeechInput();
137 } else { 137 } else {
138 input_element->stopSpeechInput(); 138 input_element->stopSpeechInput();
139 } 139 }
140 } 140 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698