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

Unified Diff: content/browser/renderer_host/media/media_stream_manager.cc

Issue 1873293002: Report if video capturing meets output protection requirement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/browser/renderer_host/media/media_stream_manager.cc
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
index cc5fe39b2c5baad646fedbe922a9e17bce301a75..c41688d6d7d0d95fdd350b3b6a8d6abfec9d6b3b 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -312,6 +312,17 @@ class MediaStreamManager::DeviceRequest {
return state_[stream_type];
}
+ void SetCapturingLinkSecured(bool is_secure) {
+ MediaObserver* media_observer =
+ GetContentClient()->browser()->GetMediaObserver();
+ if (!media_observer)
+ return;
+
+ media_observer->OnSetCapturingLinkSecured(target_process_id_,
+ target_frame_id_, page_request_id,
+ video_type_, is_secure);
+ }
+
MediaStreamRequester* const requester; // Can be NULL.
@@ -2118,4 +2129,15 @@ bool MediaStreamManager::DoesMediaDeviceIDMatchHMAC(
return guid_from_raw_device_id == device_guid;
}
+void MediaStreamManager::SetCapturingLinkSecured(bool is_secure) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+
+ for (LabeledDeviceRequest labeled_request : requests_) {
+ DeviceRequest* request = labeled_request.second;
+ if (request->video_type() == content::MEDIA_TAB_VIDEO_CAPTURE ||
+ request->video_type() == content::MEDIA_DESKTOP_VIDEO_CAPTURE)
+ request->SetCapturingLinkSecured(is_secure);
miu 2016/04/16 00:05:29 This sets all of them, not the |request| specific
xjz 2016/04/21 23:50:45 Done. Sets the requests with same session_id and M
+ }
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698