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

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

Issue 10912004: Begin adding support for tab mirroring via the MediaStream audio/video capturing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes after review by xians@. Created 8 years, 4 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/audio_input_device_manager.h
diff --git a/content/browser/renderer_host/media/audio_input_device_manager.h b/content/browser/renderer_host/media/audio_input_device_manager.h
index 3f0b34c451f46cd043ab744b1d78ab7d60d7ca0c..3fd76ca049a907024f883366f210da42016757c6 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager.h
+++ b/content/browser/renderer_host/media/audio_input_device_manager.h
@@ -29,16 +29,15 @@ namespace media_stream {
class AudioInputDeviceManagerEventHandler;
-class CONTENT_EXPORT AudioInputDeviceManager
- : public base::RefCountedThreadSafe<AudioInputDeviceManager>,
- public MediaStreamProvider {
+class CONTENT_EXPORT AudioInputDeviceManager : public MediaStreamProvider {
public:
// Calling Start() with this kFakeOpenSessionId will open the default device,
// even though Open() has not been called. This is used to be able to use the
// AudioInputDeviceManager before MediaStream is implemented.
static const int kFakeOpenSessionId;
- explicit AudioInputDeviceManager(media::AudioManager* audio_manager);
+ AudioInputDeviceManager(media::AudioManager* audio_manager,
+ media_stream::MediaStreamType device_type);
// MediaStreamProvider implementation, called on IO thread.
virtual void Register(MediaStreamProviderListener* listener,
@@ -56,7 +55,6 @@ class CONTENT_EXPORT AudioInputDeviceManager
void Stop(int session_id);
private:
- friend class base::RefCountedThreadSafe<AudioInputDeviceManager>;
virtual ~AudioInputDeviceManager();
// Executed on media stream device thread.
@@ -80,7 +78,11 @@ class CONTENT_EXPORT AudioInputDeviceManager
// Only accessed from media stream device thread.
typedef std::map<int, media::AudioDeviceName> AudioInputDeviceMap;
AudioInputDeviceMap devices_;
- media::AudioManager* audio_manager_;
+ media::AudioManager* const audio_manager_;
+
+ // The type of audio input devices managed by this instance (e.g., user
+ // audio capture, tab audio output).
+ const media_stream::MediaStreamType device_type_;
// The message loop of media stream device thread that this object runs on.
scoped_refptr<base::MessageLoopProxy> device_loop_;

Powered by Google App Engine
This is Rietveld 408576698