| Index: chrome/browser/media/desktop_capture_access_handler.cc
|
| diff --git a/chrome/browser/media/desktop_capture_access_handler.cc b/chrome/browser/media/desktop_capture_access_handler.cc
|
| index 19577a2ae691db22f867301feca4faf61a866f3a..6a544b5ad90d9ae5273a2ea36d5db74d55819b96 100644
|
| --- a/chrome/browser/media/desktop_capture_access_handler.cc
|
| +++ b/chrome/browser/media/desktop_capture_access_handler.cc
|
| @@ -152,9 +152,11 @@ std::unique_ptr<content::MediaStreamUI> GetDevicesForDesktopCapture(
|
| content::MEDIA_DESKTOP_VIDEO_CAPTURE, media_id.ToString(), "Screen"));
|
| if (capture_audio) {
|
| if (media_id.type == content::DesktopMediaID::TYPE_WEB_CONTENTS) {
|
| + content::WebContentsMediaCaptureId web_id = media_id.web_contents_id;
|
| + web_id.mute_source = mute_system_audio;
|
| devices->push_back(
|
| content::MediaStreamDevice(content::MEDIA_DESKTOP_AUDIO_CAPTURE,
|
| - media_id.ToString(), "Tab audio"));
|
| + web_id.ToString(), "Tab audio"));
|
| } else if (mute_system_audio) {
|
| // Use the special loopback device ID for system audio capture.
|
| devices->push_back(content::MediaStreamDevice(
|
| @@ -316,9 +318,9 @@ void DesktopCaptureAccessHandler::ProcessScreenCaptureAccessRequest(
|
| // display the notification for stream capture.
|
| bool display_notification = !component_extension;
|
|
|
| - ui = GetDevicesForDesktopCapture(&devices, screen_id, capture_audio, true,
|
| - display_notification, application_title,
|
| - application_title);
|
| + ui = GetDevicesForDesktopCapture(
|
| + &devices, screen_id, capture_audio, request.mute_source,
|
| + display_notification, application_title, application_title);
|
| DCHECK(!devices.empty());
|
| }
|
|
|
| @@ -425,8 +427,8 @@ void DesktopCaptureAccessHandler::HandleRequest(
|
| (check_audio_permission ? audio_permitted : true) && audio_requested &&
|
| audio_supported;
|
|
|
| - ui = GetDevicesForDesktopCapture(&devices, media_id, capture_audio, false,
|
| - true,
|
| + ui = GetDevicesForDesktopCapture(&devices, media_id, capture_audio,
|
| + request.mute_source, true,
|
| GetApplicationTitle(web_contents, extension),
|
| base::UTF8ToUTF16(original_extension_name));
|
| UpdateExtensionTrusted(request, extension);
|
|
|