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

Unified Diff: content/browser/browser_main_loop.cc

Issue 10399025: Moved instantiation of SpeechRecognitionManager inside browser_main_loop, instead of Singleton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed build issues. Created 8 years, 7 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
« no previous file with comments | « content/browser/browser_main_loop.h ('k') | content/browser/speech/input_tag_speech_dispatcher_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 9e14737002cb3a11e039c194595e1db7fdf70672..3a9250735c13b8f9828d2bdd5313d5360e0d7b3c 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -23,6 +23,7 @@
#include "content/browser/net/browser_online_state_observer.h"
#include "content/browser/plugin_service_impl.h"
#include "content/browser/renderer_host/resource_dispatcher_host_impl.h"
+#include "content/browser/speech/speech_recognition_manager_impl.h"
#include "content/browser/trace_controller_impl.h"
#include "content/common/hi_res_timer_manager.h"
#include "content/public/browser/browser_main_parts.h"
@@ -480,6 +481,8 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
if (resource_dispatcher_host_.get())
resource_dispatcher_host_.get()->Shutdown();
+ speech_recognition_manager_.reset();
+
#if defined(USE_AURA)
ImageTransportFactory::Terminate();
#endif
@@ -593,6 +596,10 @@ void BrowserMainLoop::BrowserThreadsStarted() {
// RDH needs the IO thread to be created.
resource_dispatcher_host_.reset(new ResourceDispatcherHostImpl());
+#if defined(ENABLE_INPUT_SPEECH)
+ speech_recognition_manager_.reset(new speech::SpeechRecognitionManagerImpl());
+#endif
+
// Start the GpuDataManager before we set up the MessageLoops because
// otherwise we'll trigger the assertion about doing IO on the UI thread.
content::GpuDataManager::GetInstance();
« no previous file with comments | « content/browser/browser_main_loop.h ('k') | content/browser/speech/input_tag_speech_dispatcher_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698