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

Unified Diff: content/renderer/media/video_capture_impl.h

Issue 2390103002: Reland: VideoCapture: migrate VideoCapture renderer-->host messages to mojo, part 1 (Closed)
Patch Set: Migrated renderer side as well, unittests Created 4 years, 2 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/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_;

Powered by Google App Engine
This is Rietveld 408576698