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

Unified Diff: chrome/browser/chromeos/display/output_protection_delegate.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
« no previous file with comments | « no previous file | chrome/browser/media/capture_access_handler_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/display/output_protection_delegate.cc
diff --git a/chrome/browser/chromeos/display/output_protection_delegate.cc b/chrome/browser/chromeos/display/output_protection_delegate.cc
index af8c711f68a8604cdd17ff99e287448caae12a30..0cddf0fc59e64adae68bc845cd8efe89c0ba9322 100644
--- a/chrome/browser/chromeos/display/output_protection_delegate.cc
+++ b/chrome/browser/chromeos/display/output_protection_delegate.cc
@@ -124,6 +124,8 @@ void OutputProtectionDelegate::QueryStatusComplete(
content::RenderFrameHost* rfh =
content::RenderFrameHost::FromID(render_process_id_, render_frame_id_);
+ // TODO(xjz): Investigate whether this check (and the other one above) should
+ // be removed.
if (!rfh) {
LOG(WARNING) << "RenderFrameHost is not alive.";
callback.Run(false, 0, 0);
@@ -133,14 +135,11 @@ void OutputProtectionDelegate::QueryStatusComplete(
uint32_t link_mask = response.link_mask;
// If we successfully retrieved the device level status, check for capturers.
if (response.success) {
- const bool capture_detected =
- // Check for tab capture on the current tab.
- content::WebContents::FromRenderFrameHost(rfh)->GetCapturerCount() >
- 0 ||
- // Check for desktop capture.
+ const bool insecure_capture_detected =
MediaCaptureDevicesDispatcher::GetInstance()
- ->IsDesktopCaptureInProgress();
- if (capture_detected)
+ ->IsInsecureCapturingInProgress(render_process_id_,
+ render_frame_id_);
+ if (insecure_capture_detected)
link_mask |= ui::DISPLAY_CONNECTION_TYPE_NETWORK;
}
« no previous file with comments | « no previous file | chrome/browser/media/capture_access_handler_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698