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

Unified Diff: content/browser/browser_main_loop.h

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: nits 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.h
===================================================================
--- content/browser/browser_main_loop.h (revision 207505)
+++ content/browser/browser_main_loop.h (working copy)
@@ -47,10 +47,12 @@
// Implements the main browser loop stages called from BrowserMainRunner.
// See comments in browser_main_parts.h for additional info.
-// All functions are to be called only on the UI thread unless otherwise noted.
class BrowserMainLoop {
public:
- class MemoryObserver;
+ // Returns the current instance. This is used to get access to the getters
+ // that return objects which are owned by this class.
+ static BrowserMainLoop* GetInstance();
+
explicit BrowserMainLoop(const MainFunctionParams& parameters);
virtual ~BrowserMainLoop();
@@ -72,12 +74,16 @@
int GetResultCode() const { return result_code_; }
- // Can be called on any thread.
- static media::AudioManager* GetAudioManager();
- static AudioMirroringManager* GetAudioMirroringManager();
- static MediaStreamManager* GetMediaStreamManager();
+ media::AudioManager* audio_manager() const { return audio_manager_.get(); }
+ AudioMirroringManager* audio_mirroring_manager() const {
+ return audio_mirroring_manager_.get();
+ }
+ MediaStreamManager* media_stream_manager() const {
+ return media_stream_manager_.get();
+ }
private:
+ class MemoryObserver;
// For ShutdownThreadsAndCleanUp.
friend class BrowserShutdownImpl;

Powered by Google App Engine
This is Rietveld 408576698