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

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

Issue 14081010: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some gtk issues Created 7 years, 8 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 // 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_recognizer.h" 5 #include "content/browser/speech/speech_recognizer.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "content/browser/browser_main_loop.h" 10 #include "content/browser/browser_main_loop.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 return is_capturing_audio; 148 return is_capturing_audio;
149 } 149 }
150 150
151 const SpeechRecognitionEngine& 151 const SpeechRecognitionEngine&
152 SpeechRecognizer::recognition_engine() const { 152 SpeechRecognizer::recognition_engine() const {
153 return *(recognition_engine_.get()); 153 return *(recognition_engine_.get());
154 } 154 }
155 155
156 SpeechRecognizer::~SpeechRecognizer() { 156 SpeechRecognizer::~SpeechRecognizer() {
157 endpointer_.EndSession(); 157 endpointer_.EndSession();
158 if (audio_controller_.get()) { 158 if (audio_controller_) {
159 audio_controller_->Close(base::Bind(&KeepAudioControllerRefcountedForDtor, 159 audio_controller_->Close(base::Bind(&KeepAudioControllerRefcountedForDtor,
160 audio_controller_)); 160 audio_controller_));
161 } 161 }
162 } 162 }
163 163
164 // Invoked in the audio thread. 164 // Invoked in the audio thread.
165 void SpeechRecognizer::OnError(AudioInputController* controller) { 165 void SpeechRecognizer::OnError(AudioInputController* controller) {
166 FSMEventArgs event_args(EVENT_AUDIO_ERROR); 166 FSMEventArgs event_args(EVENT_AUDIO_ERROR);
167 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 167 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
168 base::Bind(&SpeechRecognizer::DispatchEvent, 168 base::Bind(&SpeechRecognizer::DispatchEvent,
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 SpeechRecognizer::FSMEventArgs::FSMEventArgs(FSMEvent event_value) 657 SpeechRecognizer::FSMEventArgs::FSMEventArgs(FSMEvent event_value)
658 : event(event_value), 658 : event(event_value),
659 audio_data(NULL), 659 audio_data(NULL),
660 engine_error(SPEECH_RECOGNITION_ERROR_NONE) { 660 engine_error(SPEECH_RECOGNITION_ERROR_NONE) {
661 } 661 }
662 662
663 SpeechRecognizer::FSMEventArgs::~FSMEventArgs() { 663 SpeechRecognizer::FSMEventArgs::~FSMEventArgs() {
664 } 664 }
665 665
666 } // namespace content 666 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/speech/speech_recognition_manager_impl.cc ('k') | content/browser/streams/stream_url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698