Bug 1312416 - use tabbrowser message manager group to listen for decoder doctor messages, r=jaws

For browsers in e.g. panels, we can't really make decoder doctor work well, so we simply elect to only listen for such messages within tabbrowser browsers.

MozReview-Commit-ID: Frrhf6AOgAy

--HG--
extra : rebase_source : c3855599db67f25ab39dae1f7693d8c8958dee1e
This commit is contained in:
Gijs Kruitbosch 2016-10-28 18:15:30 +01:00
Родитель d0fb9fce98
Коммит af091d58e7
1 изменённых файлов: 4 добавлений и 4 удалений

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

@ -356,9 +356,9 @@ let gDecoderDoctorHandler = {
},
}
window.messageManager.addMessageListener("DecoderDoctor:Notification", gDecoderDoctorHandler);
window.messageManager.addMessageListener("EMEVideo:ContentMediaKeysRequest", gEMEHandler);
window.getGroupMessageManager("browsers").addMessageListener("DecoderDoctor:Notification", gDecoderDoctorHandler);
window.getGroupMessageManager("browsers").addMessageListener("EMEVideo:ContentMediaKeysRequest", gEMEHandler);
window.addEventListener("unload", function() {
window.messageManager.removeMessageListener("EMEVideo:ContentMediaKeysRequest", gEMEHandler);
window.messageManager.removeMessageListener("DecoderDoctor:Notification", gDecoderDoctorHandler);
window.getGroupMessageManager("browsers").removeMessageListener("EMEVideo:ContentMediaKeysRequest", gEMEHandler);
window.getGroupMessageManager("browsers").removeMessageListener("DecoderDoctor:Notification", gDecoderDoctorHandler);
}, false);