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

Unified Diff: content/browser/renderer_host/media/media_stream_manager.h

Issue 9433006: Remove GetAudioManager and GetMediaStreamManager from ResourceContext. The reason is the content mo… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync to head Created 8 years, 10 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/renderer_host/media/media_stream_manager.h
===================================================================
--- content/browser/renderer_host/media/media_stream_manager.h (revision 123165)
+++ content/browser/renderer_host/media/media_stream_manager.h (working copy)
@@ -29,6 +29,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/ref_counted.h"
+#include "base/supports_user_data.h"
#include "content/browser/renderer_host/media/media_stream_provider.h"
#include "content/browser/renderer_host/media/media_stream_settings_requester.h"
#include "content/common/media/media_stream_options.h"
@@ -36,6 +37,10 @@
class AudioManager;
+namespace content {
+class ResourceContext;
+}
+
namespace media_stream {
class AudioInputDeviceManager;
@@ -49,8 +54,15 @@
// MediaStreamManager::Listener.
class CONTENT_EXPORT MediaStreamManager
: public MediaStreamProviderListener,
- public SettingsRequester {
+ public SettingsRequester,
+ public base::SupportsUserData::Data {
public:
+ // Returns the MediaStreamManager for the given ResourceContext. If it hasn't
+ // been created yet, it will be constructed with the given AudioManager.
+ static MediaStreamManager* GetForResourceContext(
+ content::ResourceContext* resource_context,
+ AudioManager* audio_manager);
+
explicit MediaStreamManager(AudioManager* audio_manager);
virtual ~MediaStreamManager();

Powered by Google App Engine
This is Rietveld 408576698