| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |