Bug 1440356 - Combine CaptureState for all child windows when calculating overall state. r=johannh

--HG--
extra : rebase_source : 488c2c705b250e4b4fdb7254245946ec2046c8c9
extra : histedit_source : 899c13c81d62e77610150734de629b6143e9f563
This commit is contained in:
Andreas Pehrson 2018-02-23 15:52:03 +01:00
Родитель f74e7b16c3
Коммит 7f249574a3
1 изменённых файлов: 12 добавлений и 6 удалений

Просмотреть файл

@ -3602,12 +3602,18 @@ MediaManager::MediaCaptureWindowState(nsIDOMWindow* aCapturedWindow,
[&camera, &microphone, &screen, &window, &application, &browser]
(GetUserMediaWindowListener* aListener)
{
camera = aListener->CapturingSource(MediaSourceEnum::Camera);
microphone = aListener->CapturingSource(MediaSourceEnum::Microphone);
screen = aListener->CapturingSource(MediaSourceEnum::Screen);
window = aListener->CapturingSource(MediaSourceEnum::Window);
application = aListener->CapturingSource(MediaSourceEnum::Application);
browser = aListener->CapturingSource(MediaSourceEnum::Browser);
camera = CombineCaptureState(
camera, aListener->CapturingSource(MediaSourceEnum::Camera));
microphone = CombineCaptureState(
microphone, aListener->CapturingSource(MediaSourceEnum::Microphone));
screen = CombineCaptureState(
screen, aListener->CapturingSource(MediaSourceEnum::Screen));
window = CombineCaptureState(
window, aListener->CapturingSource(MediaSourceEnum::Window));
application = CombineCaptureState(
application, aListener->CapturingSource(MediaSourceEnum::Application));
browser = CombineCaptureState(
browser, aListener->CapturingSource(MediaSourceEnum::Browser));
});
}