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

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 oshima and nasko's comments, and rebased. Created 4 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/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..0ad206ae19e3472667a304ecaf7a7f84a7626d9e 100644
--- a/content/renderer/media/media_stream_video_source.h
+++ b/content/renderer/media/media_stream_video_source.h
@@ -17,6 +17,7 @@
#include "content/common/media/video_capture.h"
#include "content/public/renderer/media_stream_video_sink.h"
#include "content/renderer/media/media_stream_source.h"
+#include "content/renderer/media/secure_display_link_tracker.h"
#include "media/base/video_capture_types.h"
#include "media/base/video_frame.h"
#include "third_party/WebKit/public/platform/WebMediaConstraints.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,9 @@ 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.
+ SecureDisplayLinkTracker<MediaStreamVideoTrack> secure_tracker_;
+
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<MediaStreamVideoSource> weak_factory_;
« no previous file with comments | « content/renderer/media/media_stream_video_renderer_sink.cc ('k') | content/renderer/media/media_stream_video_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698