Commit 1c49066c authored by Guido Urdaneta's avatar Guido Urdaneta Committed by Commit Bot

Use actual WebContents to track desktop capture.

This ensures that the actual WebContents is used to track desktop
capture in MediaCaptureIndicator. Prior to this CL a null WebContents
was used.

Bug: 1140487
Change-Id: I3078dc3d071ca1dc34716de491996a275026f793
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2488160Reviewed-by: default avatarHenrik Boström <hbos@chromium.org>
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819335}
parent 323924de
......@@ -206,7 +206,6 @@ void DesktopCaptureAccessHandler::ProcessScreenCaptureAccessRequest(
#else
gfx::NativeWindow parent_window = NULL;
#endif
web_contents = NULL;
// Some extensions do not require user approval, because they provide their
// own user approval UI.
......
......@@ -332,6 +332,7 @@ MediaStreamCaptureIndicator::RegisterMediaStream(
content::WebContents* web_contents,
const blink::MediaStreamDevices& devices,
std::unique_ptr<MediaStreamUI> ui) {
DCHECK(web_contents);
auto& usage = usage_map_[web_contents];
if (!usage)
usage = std::make_unique<WebContentsDeviceUsage>(this, web_contents);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment