Index: content/renderer/media/video_capture_impl.h |
diff --git a/content/renderer/media/video_capture_impl.h b/content/renderer/media/video_capture_impl.h |
index 5df25bea7cfea0672bbffcf7c6a9e837dd39807f..606a5c6575ca815800d3e3922f4f186160541955 100644 |
--- a/content/renderer/media/video_capture_impl.h |
+++ b/content/renderer/media/video_capture_impl.h |
@@ -15,6 +15,7 @@ |
#include "base/threading/thread_checker.h" |
#include "content/common/content_export.h" |
#include "content/common/media/video_capture.h" |
+#include "content/common/video_capture.mojom.h" |
#include "content/public/renderer/media_stream_video_sink.h" |
#include "content/renderer/media/video_capture_message_filter.h" |
#include "media/base/video_capture_types.h" |
@@ -83,6 +84,10 @@ class CONTENT_EXPORT VideoCaptureImpl |
media::VideoCaptureSessionId session_id() const { return session_id_; } |
+ void SetVideoCaptureServiceForTesting(mojom::VideoCaptureService* service) { |
+ video_capture_service_for_testing_ = service; |
+ } |
+ |
protected: |
// Note: Overridden only by unit test subclasses. |
virtual void Send(IPC::Message* message); |
@@ -152,6 +157,8 @@ class CONTENT_EXPORT VideoCaptureImpl |
// Helpers. |
bool RemoveClient(int client_id, ClientInfoMap* clients); |
+ mojom::VideoCaptureService* GetVideoCaptureService(); |
+ |
// Called (by an unknown thread) when all consumers are done with a VideoFrame |
// and its ref-count has gone to zero. This helper function grabs the |
// RESOURCE_UTILIZATION value from the |metadata| and then runs the given |
@@ -165,6 +172,9 @@ class CONTENT_EXPORT VideoCaptureImpl |
int device_id_; |
const int session_id_; |
+ mojom::VideoCaptureServiceAssociatedPtr video_capture_service_; |
+ mojom::VideoCaptureService* video_capture_service_for_testing_; |
+ |
// Vector of callbacks to be notified of device format enumerations, used only |
// on IO Thread. |
std::vector<VideoCaptureDeviceFormatsCB> device_formats_cb_queue_; |