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

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: 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/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 7b75f93f6a87b341b49b576eb33ea6cda62207a0..43b476bbdf6a5a8a08a68bcc71cec624a0b872de 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,20 @@ bool MediaStreamManager::DoesMediaDeviceIDMatchHMAC(
return guid_from_raw_device_id == device_guid;
}
+void MediaStreamManager::SetCapturingLinkSecured(content::MediaStreamType type,
+ int session_id,
+ bool is_secure) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+
+ for (LabeledDeviceRequest labeled_request : requests_) {
miu 2016/04/26 01:25:13 s/LabeledDeviceRequest/const LabeledDeviceRequest&
xjz 2016/04/29 00:11:42 Done.
+ DeviceRequest* request = labeled_request.second;
+ for (const StreamDeviceInfo& device_info : request->devices) {
+ if (device_info.session_id == session_id &&
+ device_info.device.type == type) {
+ request->SetCapturingLinkSecured(is_secure);
+ }
+ }
+ }
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698