OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/browser/speech/speech_input_manager.h" |
| 6 |
| 7 #include "content/browser/browser_thread.h" |
| 8 #include "media/audio/audio_manager.h" |
| 9 |
| 10 namespace speech_input { |
| 11 |
| 12 SpeechInputManager::SpeechInputManager() : censor_results_(true) { |
| 13 } |
| 14 |
| 15 SpeechInputManager::~SpeechInputManager() { |
| 16 } |
| 17 |
| 18 void SpeechInputManager::ShowAudioInputSettings() { |
| 19 // Since AudioManager::ShowAudioInputSettings can potentially launch external |
| 20 // processes, do that in the FILE thread to not block the calling threads. |
| 21 if (!BrowserThread::CurrentlyOn(BrowserThread::FILE)) { |
| 22 BrowserThread::PostTask( |
| 23 BrowserThread::FILE, FROM_HERE, |
| 24 NewRunnableFunction(&SpeechInputManager::ShowAudioInputSettings)); |
| 25 return; |
| 26 } |
| 27 |
| 28 DCHECK(AudioManager::GetAudioManager()->CanShowAudioInputSettings()); |
| 29 if (AudioManager::GetAudioManager()->CanShowAudioInputSettings()) |
| 30 AudioManager::GetAudioManager()->ShowAudioInputSettings(); |
| 31 } |
| 32 |
| 33 } // namespace speech_input |
OLD | NEW |