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 3bad7b152eec3d3684cbef086c07acd447fccfa2..ee188df0e4f8477b15b4319dd7f72295ce939237 100644 |
--- a/content/browser/renderer_host/media/video_capture_manager.h |
+++ b/content/browser/renderer_host/media/video_capture_manager.h |
@@ -29,6 +29,7 @@ |
#include "content/browser/renderer_host/media/video_capture_controller_event_handler.h" |
#include "content/common/content_export.h" |
#include "content/common/media/media_stream_options.h" |
+#include "media/base/video_facing.h" |
#include "media/capture/video/video_capture_device.h" |
#include "media/capture/video/video_capture_device_factory.h" |
#include "media/capture/video_capture_types.h" |
@@ -53,6 +54,14 @@ class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider { |
explicit VideoCaptureManager( |
std::unique_ptr<media::VideoCaptureDeviceFactory> factory); |
+ // This can be called in anytime during the VideoCaptureManager lifecycle. |
+ // It can be called more than once and it's ok to not call at all if the |
+ // client is not interested in receiving media::VideoCaptureObserver callacks. |
+ // This method can be called on whatever thread. The callbacks of |
+ // media::VideoCaptureObserver arrive on browser threads. |
chfremer
2017/01/30 19:49:28
This seems too permissive to be true.
If we could
shenghao
2017/02/08 02:07:10
Done.
|
+ void SetVideoCaptureObserver( |
+ std::unique_ptr<media::VideoCaptureObserver> observer); |
+ |
void Unregister(); |
// Implements MediaStreamProvider. |
@@ -323,6 +332,8 @@ class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider { |
std::unique_ptr<media::VideoCaptureDeviceFactory> |
video_capture_device_factory_; |
+ std::unique_ptr<media::VideoCaptureObserver> capture_observer_; |
+ |
// Local cache of the enumerated video capture devices' names and capture |
// supported formats. A snapshot of the current devices and their capabilities |
// is composed in VideoCaptureDeviceFactory::EnumerateDeviceNames() and |