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

Unified Diff: content/browser/browser_main_loop.cc

Issue 17508005: Minor cleanup to remove the static thread-safe methods on BrowserMainLoop. Initially I thought this… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 6 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/browser_main_loop.cc
===================================================================
--- content/browser/browser_main_loop.cc (revision 207505)
+++ content/browser/browser_main_loop.cc (working copy)
@@ -276,22 +276,13 @@
};
-// static
-media::AudioManager* BrowserMainLoop::GetAudioManager() {
- return g_current_browser_main_loop->audio_manager_.get();
-}
+// BrowserMainLoop construction / destruction =============================
-// static
-AudioMirroringManager* BrowserMainLoop::GetAudioMirroringManager() {
- return g_current_browser_main_loop->audio_mirroring_manager_.get();
+BrowserMainLoop* BrowserMainLoop::GetInstance() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ return g_current_browser_main_loop;
}
-// static
-MediaStreamManager* BrowserMainLoop::GetMediaStreamManager() {
- return g_current_browser_main_loop->media_stream_manager_.get();
-}
-// BrowserMainLoop construction / destruction =============================
-
BrowserMainLoop::BrowserMainLoop(const MainFunctionParams& parameters)
: parameters_(parameters),
parsed_command_line_(parameters.command_line),
@@ -828,7 +819,8 @@
{
TRACE_EVENT0("startup",
"BrowserMainLoop::BrowserThreadsStarted:InitSpeechRecognition");
- speech_recognition_manager_.reset(new SpeechRecognitionManagerImpl());
+ speech_recognition_manager_.reset(new SpeechRecognitionManagerImpl(
+ audio_manager_.get(), media_stream_manager_.get()));
}
// Alert the clipboard class to which threads are allowed to access the

Powered by Google App Engine
This is Rietveld 408576698