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

Unified Diff: content/browser/speech/speech_input_dispatcher_host.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_dispatcher_host.cc
===================================================================
--- content/browser/speech/speech_input_dispatcher_host.cc (revision 98061)
+++ content/browser/speech/speech_input_dispatcher_host.cc (working copy)
@@ -5,6 +5,7 @@
#include "content/browser/speech/speech_input_dispatcher_host.h"
#include "base/lazy_instance.h"
+#include "content/browser/content_browser_client.h"
#include "content/common/speech_input_messages.h"
namespace speech_input {
@@ -101,8 +102,7 @@
//-------------------------- SpeechInputDispatcherHost -------------------------
-SpeechInputManager::AccessorMethod*
- SpeechInputDispatcherHost::manager_accessor_ = &SpeechInputManager::Get;
+SpeechInputManager* SpeechInputDispatcherHost::manager_;
SpeechInputDispatcherHost::SpeechInputDispatcherHost(int render_process_id)
: render_process_id_(render_process_id),
@@ -123,7 +123,9 @@
}
SpeechInputManager* SpeechInputDispatcherHost::manager() {
- return (*manager_accessor_)();
+ if (manager_)
+ return manager_;
+ return content::GetContentClient()->browser()->GetSpeechInputManager();
}
bool SpeechInputDispatcherHost::OnMessageReceived(

Powered by Google App Engine
This is Rietveld 408576698