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

Unified Diff: content/browser/speech/speech_input_manager.cc

Issue 7729001: Get rid of link dependency from content to chrome. Make it get the SpeechInputManager through the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/speech/speech_input_manager.cc
===================================================================
--- content/browser/speech/speech_input_manager.cc (revision 0)
+++ content/browser/speech/speech_input_manager.cc (revision 0)
@@ -0,0 +1,33 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/browser/speech/speech_input_manager.h"
+
+#include "content/browser/browser_thread.h"
+#include "media/audio/audio_manager.h"
+
+namespace speech_input {
+
+SpeechInputManager::SpeechInputManager() : censor_results_(true) {
+}
+
+SpeechInputManager::~SpeechInputManager() {
+}
+
+void SpeechInputManager::ShowAudioInputSettings() {
Satish 2011/08/25 09:08:52 was this moved from the chrome/ to content/ becaus
jam 2011/08/25 16:36:43 It was moved because other content code depended o
+ // Since AudioManager::ShowAudioInputSettings can potentially launch external
+ // processes, do that in the FILE thread to not block the calling threads.
+ if (!BrowserThread::CurrentlyOn(BrowserThread::FILE)) {
+ BrowserThread::PostTask(
+ BrowserThread::FILE, FROM_HERE,
+ NewRunnableFunction(&SpeechInputManager::ShowAudioInputSettings));
+ return;
+ }
+
+ DCHECK(AudioManager::GetAudioManager()->CanShowAudioInputSettings());
+ if (AudioManager::GetAudioManager()->CanShowAudioInputSettings())
+ AudioManager::GetAudioManager()->ShowAudioInputSettings();
+}
+
+} // namespace speech_input
Property changes on: content\browser\speech\speech_input_manager.cc
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698