OLD | NEW |
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/renderer_host/media/media_stream_ui_proxy.h" | 10 #include "content/browser/renderer_host/media/media_stream_ui_proxy.h" |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 | 665 |
666 const SpeechRecognitionSessionConfig& | 666 const SpeechRecognitionSessionConfig& |
667 SpeechRecognitionManagerImpl::GetSessionConfig(int session_id) const { | 667 SpeechRecognitionManagerImpl::GetSessionConfig(int session_id) const { |
668 return GetSession(session_id)->config; | 668 return GetSession(session_id)->config; |
669 } | 669 } |
670 | 670 |
671 bool SpeechRecognitionManagerImpl::HasAudioInputDevices() { | 671 bool SpeechRecognitionManagerImpl::HasAudioInputDevices() { |
672 return audio_manager_->HasAudioInputDevices(); | 672 return audio_manager_->HasAudioInputDevices(); |
673 } | 673 } |
674 | 674 |
675 string16 SpeechRecognitionManagerImpl::GetAudioInputDeviceModel() { | 675 base::string16 SpeechRecognitionManagerImpl::GetAudioInputDeviceModel() { |
676 return audio_manager_->GetAudioInputDeviceModel(); | 676 return audio_manager_->GetAudioInputDeviceModel(); |
677 } | 677 } |
678 | 678 |
679 void SpeechRecognitionManagerImpl::ShowAudioInputSettings() { | 679 void SpeechRecognitionManagerImpl::ShowAudioInputSettings() { |
680 // Since AudioManager::ShowAudioInputSettings can potentially launch external | 680 // Since AudioManager::ShowAudioInputSettings can potentially launch external |
681 // processes, do that in the FILE thread to not block the calling threads. | 681 // processes, do that in the FILE thread to not block the calling threads. |
682 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, | 682 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
683 base::Bind(&ShowAudioInputSettingsOnFileThread, | 683 base::Bind(&ShowAudioInputSettingsOnFileThread, |
684 audio_manager_)); | 684 audio_manager_)); |
685 } | 685 } |
686 | 686 |
687 SpeechRecognitionManagerImpl::Session::Session() | 687 SpeechRecognitionManagerImpl::Session::Session() |
688 : id(kSessionIDInvalid), | 688 : id(kSessionIDInvalid), |
689 abort_requested(false), | 689 abort_requested(false), |
690 listener_is_active(true) { | 690 listener_is_active(true) { |
691 } | 691 } |
692 | 692 |
693 SpeechRecognitionManagerImpl::Session::~Session() { | 693 SpeechRecognitionManagerImpl::Session::~Session() { |
694 } | 694 } |
695 | 695 |
696 } // namespace content | 696 } // namespace content |
OLD | NEW |