Bug 1649121: part 26) Move `CollectTopMostChildContentsCompletelyInRange`. r=masayuki
[gecko.git] / remote / domains / parent / Browser.jsm
blob9e496e52f64c31b9e32b8de474d8184f6f8a42f0
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 "use strict";
7 var EXPORTED_SYMBOLS = ["Browser"];
9 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
10 const { Domain } = ChromeUtils.import(
11   "chrome://remote/content/domains/Domain.jsm"
14 class Browser extends Domain {
15   getVersion() {
16     const { isHeadless } = Cc["@mozilla.org/gfx/info;1"].getService(
17       Ci.nsIGfxInfo
18     );
19     const { userAgent } = Cc[
20       "@mozilla.org/network/protocol;1?name=http"
21     ].getService(Ci.nsIHttpProtocolHandler);
22     return {
23       protocolVersion: "1.3",
24       product: (isHeadless ? "Headless " : "") + "Firefox",
25       revision: "1",
26       userAgent,
27       jsVersion: "1.8.5",
28     };
29   }
31   close() {
32     Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit);
33   }