1 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 var EXPORTED_SYMBOLS = ["AboutNewInstallChild"];
8 const { RemotePageChild } = ChromeUtils.import(
9 "resource://gre/actors/RemotePageChild.jsm"
12 ChromeUtils.defineModuleGetter(
15 "resource://gre/modules/UpdateUtils.jsm"
18 class AboutNewInstallChild extends RemotePageChild {
22 this.exportFunctions(["RPMGetUpdateChannel", "RPMGetFxAccountsEndpoint"]);
25 RPMGetUpdateChannel() {
26 return UpdateUtils.UpdateChannel;
29 RPMGetFxAccountsEndpoint(aEntrypoint) {
30 return this.wrapPromise(
31 new Promise(resolve => {
32 this.sendQuery("FxAccountsEndpoint", { entrypoint: aEntrypoint }).then(
34 resolve(Cu.cloneInto(result, this.contentWindow));