| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 | 646 |
| 647 const SpeechRecognitionSessionConfig& | 647 const SpeechRecognitionSessionConfig& |
| 648 SpeechRecognitionManagerImpl::GetSessionConfig(int session_id) const { | 648 SpeechRecognitionManagerImpl::GetSessionConfig(int session_id) const { |
| 649 return GetSession(session_id)->config; | 649 return GetSession(session_id)->config; |
| 650 } | 650 } |
| 651 | 651 |
| 652 bool SpeechRecognitionManagerImpl::HasAudioInputDevices() { | 652 bool SpeechRecognitionManagerImpl::HasAudioInputDevices() { |
| 653 return audio_manager_->HasAudioInputDevices(); | 653 return audio_manager_->HasAudioInputDevices(); |
| 654 } | 654 } |
| 655 | 655 |
| 656 base::string16 SpeechRecognitionManagerImpl::GetAudioInputDeviceModel() { | |
| 657 return audio_manager_->GetAudioInputDeviceModel(); | |
| 658 } | |
| 659 | |
| 660 void SpeechRecognitionManagerImpl::ShowAudioInputSettings() { | 656 void SpeechRecognitionManagerImpl::ShowAudioInputSettings() { |
| 661 // Since AudioManager::ShowAudioInputSettings can potentially launch external | 657 // Since AudioManager::ShowAudioInputSettings can potentially launch external |
| 662 // processes, do that in the FILE thread to not block the calling threads. | 658 // processes, do that in the FILE thread to not block the calling threads. |
| 663 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, | 659 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
| 664 base::Bind(&ShowAudioInputSettingsOnFileThread, | 660 base::Bind(&ShowAudioInputSettingsOnFileThread, |
| 665 audio_manager_)); | 661 audio_manager_)); |
| 666 } | 662 } |
| 667 | 663 |
| 668 SpeechRecognitionManagerImpl::Session::Session() | 664 SpeechRecognitionManagerImpl::Session::Session() |
| 669 : id(kSessionIDInvalid), | 665 : id(kSessionIDInvalid), |
| 670 abort_requested(false), | 666 abort_requested(false), |
| 671 listener_is_active(true) { | 667 listener_is_active(true) { |
| 672 } | 668 } |
| 673 | 669 |
| 674 SpeechRecognitionManagerImpl::Session::~Session() { | 670 SpeechRecognitionManagerImpl::Session::~Session() { |
| 675 } | 671 } |
| 676 | 672 |
| 677 } // namespace content | 673 } // namespace content |
| OLD | NEW |