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

Side by Side Diff: chrome/browser/speech/speech_recognizer.cc

Issue 3352018: Show error messages in speech bubble allowing user to retry as well. (Closed)
Patch Set: Address joth's comments. Created 10 years, 3 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/speech/speech_recognizer.h" 5 #include "chrome/browser/speech/speech_recognizer.h"
6 6
7 #include "base/ref_counted.h" 7 #include "base/ref_counted.h"
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "chrome/browser/chrome_thread.h" 10 #include "chrome/browser/chrome_thread.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 scoped_refptr<SpeechRecognizer> me(this); 300 scoped_refptr<SpeechRecognizer> me(this);
301 delegate_->DidCompleteRecognition(caller_id_); 301 delegate_->DidCompleteRecognition(caller_id_);
302 } 302 }
303 303
304 void SpeechRecognizer::InformErrorAndCancelRecognition(ErrorCode error) { 304 void SpeechRecognizer::InformErrorAndCancelRecognition(ErrorCode error) {
305 CancelRecognition(); 305 CancelRecognition();
306 306
307 // Guard against the delegate freeing us until we finish our job. 307 // Guard against the delegate freeing us until we finish our job.
308 scoped_refptr<SpeechRecognizer> me(this); 308 scoped_refptr<SpeechRecognizer> me(this);
309 delegate_->OnRecognizerError(caller_id_, error); 309 delegate_->OnRecognizerError(caller_id_, error);
310 delegate_->DidCompleteRecording(caller_id_);
311 delegate_->DidCompleteRecognition(caller_id_);
312 } 310 }
313 311
314 } // namespace speech_input 312 } // namespace speech_input
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698