зеркало из https://github.com/mozilla/gecko-dev.git
Bug 782289 - Headphones status notification. Part 2: Generate mozChromeEvent. r=vingtetun
Catching the 'headphones-status' event that is generated by AudioManager and generating a mozChromeEvent matching. It will allow us to grab this event in Gaia's status bar.
This commit is contained in:
Родитель
d346b69ee9
Коммит
66c8014cf7
|
@ -703,6 +703,15 @@ window.addEventListener('ContentStart', function ss_onContentStart() {
|
||||||
}, "geolocation-device-events", false);
|
}, "geolocation-device-events", false);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
(function headphonesStatusTracker() {
|
||||||
|
Services.obs.addObserver(function(aSubject, aTopic, aData) {
|
||||||
|
shell.sendChromeEvent({
|
||||||
|
type: 'headphones-status',
|
||||||
|
state: aData
|
||||||
|
});
|
||||||
|
}, "headphones-status", false);
|
||||||
|
})();
|
||||||
|
|
||||||
(function recordingStatusTracker() {
|
(function recordingStatusTracker() {
|
||||||
let gRecordingActiveCount = 0;
|
let gRecordingActiveCount = 0;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче