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

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

Issue 1873293002: Report if video capturing meets output protection requirement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Rebased. Created 4 years, 8 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/media_stream_video_source.h
diff --git a/content/renderer/media/media_stream_video_source.h b/content/renderer/media/media_stream_video_source.h
index e2e24f008c99873e770739be60062d94cd95a69f..ee0d884cf26f2fb712e7101309aa3fc4db576445 100644
--- a/content/renderer/media/media_stream_video_source.h
+++ b/content/renderer/media/media_stream_video_source.h
@@ -16,6 +16,7 @@
#include "content/common/content_export.h"
#include "content/common/media/video_capture.h"
#include "content/public/renderer/media_stream_video_sink.h"
+#include "content/renderer/media/capturing_link_secure_tracker.h"
#include "content/renderer/media/media_stream_source.h"
#include "media/base/video_capture_types.h"
#include "media/base/video_frame.h"
@@ -81,12 +82,17 @@ class CONTENT_EXPORT MediaStreamVideoSource
const ConstraintsCallback& callback);
void RemoveTrack(MediaStreamVideoTrack* track);
+ void UpdateCapturingLinkSecure(MediaStreamVideoTrack* track, bool is_secure);
+
// Return true if |name| is a constraint supported by MediaStreamVideoSource.
static bool IsConstraintSupported(const std::string& name);
// Request underlying source to capture a new frame.
virtual void RequestRefreshFrame() {}
+ // Notify underlying source if the capturing link is secure.
+ virtual void SetCapturingLinkSecured(bool is_secure) {}
+
// Returns the task runner where video frames will be delivered on.
base::SingleThreadTaskRunner* io_task_runner() const;
@@ -187,6 +193,10 @@ class CONTENT_EXPORT MediaStreamVideoSource
// Tracks that currently are connected to this source.
std::vector<MediaStreamVideoTrack*> tracks_;
+ // This is used for tracking if all connected video sinks are secure.
+ std::unique_ptr<CapturingLinkSecureTracker<MediaStreamVideoTrack>>
miu 2016/04/26 01:25:14 Please remove the indirection here.
xjz 2016/04/29 00:11:42 Done.
+ secure_tracker_;
+
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<MediaStreamVideoSource> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698