Merge autoland to mozilla-central. a=merge
[gecko.git] / browser / actors / BrowserProcessChild.sys.mjs
blobc16b0c6e9295227bf59dc5b9c3bf2960caaf7e0c
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 const lazy = {};
7 ChromeUtils.defineESModuleGetters(lazy, {
8   AboutHomeStartupCacheChild: "resource:///modules/AboutNewTabService.sys.mjs",
9   WebRTCChild: "resource:///actors/WebRTCChild.sys.mjs",
10 });
12 export class BrowserProcessChild extends JSProcessActorChild {
13   receiveMessage(message) {
14     switch (message.name) {
15       case "AboutHomeStartupCache:InputStreams":
16         let { pageInputStream, scriptInputStream } = message.data;
17         lazy.AboutHomeStartupCacheChild.init(
18           pageInputStream,
19           scriptInputStream
20         );
21         break;
22     }
23   }
25   observe(subject, topic, data) {
26     switch (topic) {
27       case "getUserMedia:request":
28       case "recording-device-stopped":
29       case "PeerConnection:request":
30       case "recording-device-events":
31       case "recording-window-ended":
32         lazy.WebRTCChild.observe(subject, topic, data);
33         break;
34     }
35   }