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

Unified Diff: chrome/browser/chromeos/display/output_protection_delegate.cc

Issue 2095963004: Revert of media: Add OutputProtectionProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/encrypted_media_browsertest.cc » ('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 34e7c015f39e34d487ba3d7779f9bce6644d4a1b..33862780e730cb1bbf2d2b89ab2c377106896b55 100644
--- a/chrome/browser/chromeos/display/output_protection_delegate.cc
+++ b/chrome/browser/chromeos/display/output_protection_delegate.cc
@@ -7,6 +7,7 @@
#include "ash/shell.h"
#include "ash/shell_delegate.h"
#include "build/build_config.h"
+#include "chrome/browser/media/media_capture_devices_dispatcher.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
@@ -132,7 +133,18 @@
return;
}
- callback.Run(response.success, response.link_mask, response.protection_mask);
+ uint32_t link_mask = response.link_mask;
+ // If we successfully retrieved the device level status, check for capturers.
+ if (response.success) {
+ const bool insecure_capture_detected =
+ MediaCaptureDevicesDispatcher::GetInstance()
+ ->IsInsecureCapturingInProgress(render_process_id_,
+ render_frame_id_);
+ if (insecure_capture_detected)
+ link_mask |= ui::DISPLAY_CONNECTION_TYPE_NETWORK;
+ }
+
+ callback.Run(response.success, link_mask, response.protection_mask);
}
void OutputProtectionDelegate::EnableProtectionComplete(
« no previous file with comments | « no previous file | chrome/browser/media/encrypted_media_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698