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

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 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/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 8bd1bc4bc13eb92f0a812d4d39aae7c0c4415592..fa521ecb14795b6e2239e921e43293393d7813ff 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -309,6 +309,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.
@@ -2165,4 +2176,25 @@ bool MediaStreamManager::IsOriginAllowed(int render_process_id,
return true;
}
+void MediaStreamManager::SetCapturingLinkSecured(int render_process_id,
+ int session_id,
+ content::MediaStreamType type,
+ bool is_secure) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+
+ for (LabeledDeviceRequest& labeled_request : requests_) {
+ DeviceRequest* request = labeled_request.second;
+ if (request->requesting_process_id != render_process_id)
+ continue;
+
+ for (const StreamDeviceInfo& device_info : request->devices) {
+ if (device_info.session_id == session_id &&
+ device_info.device.type == type) {
+ request->SetCapturingLinkSecured(is_secure);
+ return;
+ }
+ }
+ }
+}
+
} // namespace content
« no previous file with comments | « content/browser/renderer_host/media/media_stream_manager.h ('k') | content/common/media/media_stream_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698