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

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

Issue 16286010: Removed the IsRecordingInProcess check for speech since it is not needed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed unused error code and relevant resource, cleaned up include Created 7 years, 6 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_manager_impl.h" 5 #include "content/browser/speech/speech_recognition_manager_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/browser/browser_main_loop.h" 8 #include "content/browser/browser_main_loop.h"
9 #include "content/browser/renderer_host/media/media_stream_manager.h" 9 #include "content/browser/renderer_host/media/media_stream_manager.h"
10 #include "content/browser/speech/google_one_shot_remote_engine.h" 10 #include "content/browser/speech/google_one_shot_remote_engine.h"
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 648
649 const SpeechRecognitionSessionConfig& 649 const SpeechRecognitionSessionConfig&
650 SpeechRecognitionManagerImpl::GetSessionConfig(int session_id) const { 650 SpeechRecognitionManagerImpl::GetSessionConfig(int session_id) const {
651 return GetSession(session_id).config; 651 return GetSession(session_id).config;
652 } 652 }
653 653
654 bool SpeechRecognitionManagerImpl::HasAudioInputDevices() { 654 bool SpeechRecognitionManagerImpl::HasAudioInputDevices() {
655 return BrowserMainLoop::GetAudioManager()->HasAudioInputDevices(); 655 return BrowserMainLoop::GetAudioManager()->HasAudioInputDevices();
656 } 656 }
657 657
658 bool SpeechRecognitionManagerImpl::IsCapturingAudio() {
659 return BrowserMainLoop::GetAudioManager()->IsRecordingInProcess();
660 }
661
662 string16 SpeechRecognitionManagerImpl::GetAudioInputDeviceModel() { 658 string16 SpeechRecognitionManagerImpl::GetAudioInputDeviceModel() {
663 return BrowserMainLoop::GetAudioManager()->GetAudioInputDeviceModel(); 659 return BrowserMainLoop::GetAudioManager()->GetAudioInputDeviceModel();
664 } 660 }
665 661
666 void SpeechRecognitionManagerImpl::ShowAudioInputSettings() { 662 void SpeechRecognitionManagerImpl::ShowAudioInputSettings() {
667 // Since AudioManager::ShowAudioInputSettings can potentially launch external 663 // Since AudioManager::ShowAudioInputSettings can potentially launch external
668 // processes, do that in the FILE thread to not block the calling threads. 664 // processes, do that in the FILE thread to not block the calling threads.
669 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 665 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
670 base::Bind(&ShowAudioInputSettingsOnFileThread)); 666 base::Bind(&ShowAudioInputSettingsOnFileThread));
671 } 667 }
672 668
673 SpeechRecognitionManagerImpl::Session::Session() 669 SpeechRecognitionManagerImpl::Session::Session()
674 : id(kSessionIDInvalid), 670 : id(kSessionIDInvalid),
675 listener_is_active(true) { 671 listener_is_active(true) {
676 } 672 }
677 673
678 SpeechRecognitionManagerImpl::Session::~Session() { 674 SpeechRecognitionManagerImpl::Session::~Session() {
679 } 675 }
680 676
681 } // namespace content 677 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/speech/speech_recognition_manager_impl.h ('k') | content/browser/speech/speech_recognizer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698