summaryrefslogtreecommitdiffstats
path: root/media/audio
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-23 17:13:18 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-23 17:13:18 +0000
commit52e456b96b2b2c82a24a63a1d0cfc90904a5a72c (patch)
tree0886be2d3b349179899dd0d2cdff6a9066024f87 /media/audio
parentc66e3a642f309df26af612e38320126a348a7fe8 (diff)
downloadchromium_src-52e456b96b2b2c82a24a63a1d0cfc90904a5a72c.zip
chromium_src-52e456b96b2b2c82a24a63a1d0cfc90904a5a72c.tar.gz
chromium_src-52e456b96b2b2c82a24a63a1d0cfc90904a5a72c.tar.bz2
Remove GetAudioManager and GetMediaStreamManager from ResourceContext. The reason is the content module should create all the concrete objects that it knows about, instead of depending on every embedder to do so. ResourceContext is then just the interfaces that it implements and which it provides on the IO thread.
The AudioManager getter was a global, so I added a getter to the AudioManager class. MediaStreamManager now has its own static getter like other internal content classes on ResourceContext or BrowserContext. BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9433006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123264 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio')
-rw-r--r--media/audio/audio_manager.cc8
1 files changed, 0 insertions, 8 deletions
diff --git a/media/audio/audio_manager.cc b/media/audio/audio_manager.cc
index 2ca71f2..d118789 100644
--- a/media/audio/audio_manager.cc
+++ b/media/audio/audio_manager.cc
@@ -8,26 +8,18 @@
#include "base/logging.h"
#include "base/message_loop.h"
-// Used only to make sure we never create more than one instance.
-static AudioManager* g_audio_manager = NULL;
-
// Forward declaration of the platform specific AudioManager factory function.
AudioManager* CreateAudioManager();
AudioManager::AudioManager() {
- CHECK(g_audio_manager == NULL);
- g_audio_manager = this;
}
AudioManager::~AudioManager() {
- CHECK(g_audio_manager == this);
- g_audio_manager = NULL;
}
// static
AudioManager* AudioManager::Create() {
AudioManager* ret = CreateAudioManager();
- DCHECK(ret == g_audio_manager);
ret->Init();
return ret;
}