OLD | NEW |
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_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/render_view_host_impl.h" | 9 #include "content/browser/renderer_host/render_view_host_impl.h" |
10 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" | 10 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // Since AudioManager::ShowAudioInputSettings can potentially launch external | 107 // Since AudioManager::ShowAudioInputSettings can potentially launch external |
108 // processes, do that in the FILE thread to not block the calling threads. | 108 // processes, do that in the FILE thread to not block the calling threads. |
109 if (!BrowserThread::CurrentlyOn(BrowserThread::FILE)) { | 109 if (!BrowserThread::CurrentlyOn(BrowserThread::FILE)) { |
110 BrowserThread::PostTask( | 110 BrowserThread::PostTask( |
111 BrowserThread::FILE, FROM_HERE, | 111 BrowserThread::FILE, FROM_HERE, |
112 base::Bind(&SpeechRecognitionManagerImpl::ShowAudioInputSettings, | 112 base::Bind(&SpeechRecognitionManagerImpl::ShowAudioInputSettings, |
113 base::Unretained(this))); | 113 base::Unretained(this))); |
114 return; | 114 return; |
115 } | 115 } |
116 | 116 |
117 AudioManager* audio_manager = BrowserMainLoop::GetAudioManager(); | 117 media::AudioManager* audio_manager = BrowserMainLoop::GetAudioManager(); |
118 DCHECK(audio_manager->CanShowAudioInputSettings()); | 118 DCHECK(audio_manager->CanShowAudioInputSettings()); |
119 if (audio_manager->CanShowAudioInputSettings()) | 119 if (audio_manager->CanShowAudioInputSettings()) |
120 audio_manager->ShowAudioInputSettings(); | 120 audio_manager->ShowAudioInputSettings(); |
121 } | 121 } |
122 | 122 |
123 void SpeechRecognitionManagerImpl::StartRecognition( | 123 void SpeechRecognitionManagerImpl::StartRecognition( |
124 InputTagSpeechDispatcherHost* delegate, | 124 InputTagSpeechDispatcherHost* delegate, |
125 int caller_id, | 125 int caller_id, |
126 int render_process_id, | 126 int render_process_id, |
127 int render_view_id, | 127 int render_view_id, |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 | 357 |
358 SpeechRecognitionManagerImpl::Request::Request() | 358 SpeechRecognitionManagerImpl::Request::Request() |
359 : delegate(NULL), | 359 : delegate(NULL), |
360 is_active(false) { | 360 is_active(false) { |
361 } | 361 } |
362 | 362 |
363 SpeechRecognitionManagerImpl::Request::~Request() { | 363 SpeechRecognitionManagerImpl::Request::~Request() { |
364 } | 364 } |
365 | 365 |
366 } // namespace speech | 366 } // namespace speech |
OLD | NEW |