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

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

Issue 10391065: handle the case when device is closed before media pipeline is fully initialized. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: code review Created 8 years, 7 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/video_capture_manager.h
===================================================================
--- content/browser/renderer_host/media/video_capture_manager.h (revision 138673)
+++ content/browser/renderer_host/media/video_capture_manager.h (working copy)
@@ -22,6 +22,7 @@
#include "media/video/capture/video_capture_device.h"
#include "media/video/capture/video_capture_types.h"
+class MockVideoCaptureManager;
class VideoCaptureController;
class VideoCaptureControllerEventHandler;
@@ -54,18 +55,18 @@
// Start allocates the device and no other application can use the device
// before Stop is called. Captured video frames will be delivered to
// video_capture_receiver.
- void Start(const media::VideoCaptureParams& capture_params,
+ virtual void Start(const media::VideoCaptureParams& capture_params,
media::VideoCaptureDevice::EventHandler* video_capture_receiver);
// Stops capture device referenced by |capture_session_id|. No more frames
// will be delivered to the frame receiver, and |stopped_cb| will be called.
// |stopped_cb| can be NULL.
- void Stop(const media::VideoCaptureSessionId& capture_session_id,
+ virtual void Stop(const media::VideoCaptureSessionId& capture_session_id,
base::Closure stopped_cb);
// A capture device error has occurred for |capture_session_id|. The device
// won't stream any more captured frames.
- void Error(const media::VideoCaptureSessionId& capture_session_id);
+ virtual void Error(const media::VideoCaptureSessionId& capture_session_id);
// Used by unit test to make sure a fake device is used instead of a real
// video capture device. Due to timing requirements, the function must be
@@ -85,6 +86,7 @@
VideoCaptureControllerEventHandler* handler);
private:
+ friend class ::MockVideoCaptureManager;
friend class base::RefCountedThreadSafe<VideoCaptureManager>;
virtual ~VideoCaptureManager();

Powered by Google App Engine
This is Rietveld 408576698