Index: content/browser/renderer_host/media/video_capture_manager.h |
diff --git a/content/browser/renderer_host/media/video_capture_manager.h b/content/browser/renderer_host/media/video_capture_manager.h |
index 4a2f55478cfcd951f0d35155e789433c307c7e83..9979c03414e45593e03f8835b38be97e07555d1f 100644 |
--- a/content/browser/renderer_host/media/video_capture_manager.h |
+++ b/content/browser/renderer_host/media/video_capture_manager.h |
@@ -29,9 +29,7 @@ class VideoCaptureControllerEventHandler; |
namespace media_stream { |
// VideoCaptureManager opens/closes and start/stops video capture devices. |
-class CONTENT_EXPORT VideoCaptureManager |
- : public base::RefCountedThreadSafe<VideoCaptureManager>, |
- public MediaStreamProvider { |
+class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider { |
public: |
// Calling |Start| of this id will open the first device, even though open has |
// not been called. This is used to be able to use video capture devices |
@@ -87,7 +85,6 @@ class CONTENT_EXPORT VideoCaptureManager |
private: |
friend class ::MockVideoCaptureManager; |
- friend class base::RefCountedThreadSafe<VideoCaptureManager>; |
virtual ~VideoCaptureManager(); |
@@ -111,15 +108,18 @@ class CONTENT_EXPORT VideoCaptureManager |
VideoCaptureControllerEventHandler* handler); |
// Executed on Browser::IO thread to call Listener. |
- void OnOpened(int capture_session_id); |
- void OnClosed(int capture_session_id); |
+ void OnOpened(content::MediaStreamDeviceType type, int capture_session_id); |
+ void OnClosed(content::MediaStreamDeviceType type, int capture_session_id); |
void OnDevicesEnumerated(const StreamDeviceInfoArray& devices); |
- void OnError(int capture_session_id, MediaStreamProviderError error); |
+ void OnError(content::MediaStreamDeviceType type, int capture_session_id, |
+ MediaStreamProviderError error); |
// Executed on device thread to make sure Listener is called from |
// Browser::IO thread. |
- void PostOnOpened(int capture_session_id); |
- void PostOnClosed(int capture_session_id); |
+ void PostOnOpened(content::MediaStreamDeviceType type, |
+ int capture_session_id); |
+ void PostOnClosed(content::MediaStreamDeviceType type, |
+ int capture_session_id); |
void PostOnDevicesEnumerated(const StreamDeviceInfoArray& devices); |
void PostOnError(int capture_session_id, MediaStreamProviderError error); |
@@ -142,7 +142,11 @@ class CONTENT_EXPORT VideoCaptureManager |
// Only accessed from device thread. |
// VideoCaptureManager owns all VideoCaptureDevices and is responsible for |
// deleting the instances when they are not used any longer. |
- typedef std::map<int, media::VideoCaptureDevice*> VideoCaptureDevices; |
+ struct DeviceEntry { |
+ content::MediaStreamDeviceType stream_type; |
+ media::VideoCaptureDevice* capture_device; |
tommi (sloooow) - chröme
2012/09/10 09:17:25
who owns the capture_device?
If ownership lies wit
wjia(left Chromium)
2012/09/10 17:40:16
The comment above the struct is correct. scoped_pt
miu
2012/09/10 21:24:38
wjia@ addressed this: VideoCaptureDevice is shared
|
+ }; |
+ typedef std::map<int, DeviceEntry> VideoCaptureDevices; |
VideoCaptureDevices devices_; |
// Set to true if using fake devices for testing, false by default. |