diff --git a/content/browser/image_capture/image_capture_impl.cc b/content/browser/image_capture/image_capture_impl.cc index 044e864cfed7d..c2d3df43f694e 100644 --- a/content/browser/image_capture/image_capture_impl.cc +++ b/content/browser/image_capture/image_capture_impl.cc @@ -116,6 +116,19 @@ void ImageCaptureImpl::SetPhotoOptions(const std::string& source_id, "ImageCaptureImpl::SetPhotoOptions", TRACE_EVENT_SCOPE_PROCESS); + // POC DIAGNOSTIC ONLY -- not part of the attack. Logs the browser-process + // view of frame visibility to prove the browser KNOWS the page is hidden but + // still forwards PTZ because there is no visibility check below. + if (settings->has_pan || settings->has_tilt || settings->has_zoom) { + LOG(ERROR) << "[POC-BROWSER] ImageCaptureImpl::SetPhotoOptions PTZ request " + << "pan=" << settings->pan << " tilt=" << settings->tilt + << " zoom=" << settings->zoom + << " ; render_frame_host().GetVisibilityState()=" + << static_cast(render_frame_host().GetVisibilityState()) + << " (0=kVisible 1=kHidden 2=kHiddenButPainting)" + << " ; HasPanTiltZoomPermissionGranted()=" + << HasPanTiltZoomPermissionGranted(); + } if ((settings->has_pan || settings->has_tilt || settings->has_zoom) && !HasPanTiltZoomPermissionGranted()) { std::move(callback).Run(false);