Index: content/renderer/media/video_capture_module_impl.h |
=================================================================== |
--- content/renderer/media/video_capture_module_impl.h (revision 101731) |
+++ content/renderer/media/video_capture_module_impl.h (working copy) |
@@ -22,7 +22,10 @@ |
public: |
VideoCaptureModuleImpl(const media::VideoCaptureSessionId id, |
VideoCaptureImplManager* vc_manager); |
- virtual ~VideoCaptureModuleImpl(); |
+ // Implement reference counting. This make it possible to reference the |
+ // object from both Chromium and WebRtc. |
+ virtual int32_t AddRef() OVERRIDE; |
+ virtual int32_t Release() OVERRIDE; |
// Override webrtc::videocapturemodule::VideoCaptureImpl implementation. |
virtual WebRtc_Word32 StartCapture( |
@@ -45,6 +48,7 @@ |
const media::VideoCaptureParams& device_info); |
private: |
+ virtual ~VideoCaptureModuleImpl(); |
void Init(); |
void StartCaptureOnCaptureThread( |
@@ -76,6 +80,7 @@ |
media::VideoCapture* capture_engine_; |
bool pending_start_; |
webrtc::VideoCaptureCapability pending_cap_; |
+ int ref_count_; |
DISALLOW_COPY_AND_ASSIGN(VideoCaptureModuleImpl); |
}; |