Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
49
gaia/apps/system/js/system_window.js
Executable file
49
gaia/apps/system/js/system_window.js
Executable file
|
|
@ -0,0 +1,49 @@
|
|||
/* global AudioChannelController */
|
||||
/* global BaseModule */
|
||||
'use strict';
|
||||
|
||||
(function() {
|
||||
/**
|
||||
* SystemWindow is a placeholder for the system app's mozbrowser iframe
|
||||
* but with no actual UI.
|
||||
* We will use mozSystemWindowChromeEvent/mozContentEvent to communicate
|
||||
* with shell.js to use the actual mozbrowser iframe of the system app.
|
||||
*/
|
||||
var SystemWindow = function() {};
|
||||
|
||||
SystemWindow.STATES = [
|
||||
'getAudioChannels'
|
||||
];
|
||||
|
||||
BaseModule.create(SystemWindow, {
|
||||
name: 'SystemWindow',
|
||||
EVENT_PREFIX: 'systemwindow',
|
||||
DEBUG: false,
|
||||
// The fake app window ID of System app.
|
||||
instanceID: null,
|
||||
// The audio channels belong to System app.
|
||||
audioChannels: null,
|
||||
|
||||
/**
|
||||
* Initial the module.
|
||||
*/
|
||||
_start: function() {
|
||||
this.instanceID = 'systemAppID';
|
||||
this.audioChannels = new Map();
|
||||
var audioChannelManager = navigator.mozAudioChannelManager;
|
||||
// There is no mozAudioChannelManager in b2g desktop client.
|
||||
if (audioChannelManager && audioChannelManager.allowedAudioChannels) {
|
||||
audioChannelManager.allowedAudioChannels.forEach((audioChannel) => {
|
||||
this.audioChannels.set(
|
||||
audioChannel.name, new AudioChannelController(this, audioChannel)
|
||||
);
|
||||
});
|
||||
this.publish('audiochannelsregistered');
|
||||
}
|
||||
},
|
||||
|
||||
getAudioChannels: function() {
|
||||
return this.audioChannels;
|
||||
}
|
||||
});
|
||||
}());
|
||||
Loading…
Reference in a new issue