2019-02-22 02:04:13 +03:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
var EXPORTED_SYMBOLS = ["Browser"];
|
|
|
|
|
2019-03-10 15:51:05 +03:00
|
|
|
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
2019-02-22 02:04:13 +03:00
|
|
|
const {Domain} = ChromeUtils.import("chrome://remote/content/domains/Domain.jsm");
|
|
|
|
|
|
|
|
class Browser extends Domain {
|
|
|
|
getVersion() {
|
2019-06-20 17:36:19 +03:00
|
|
|
const { isHeadless } = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo);
|
2019-02-22 02:04:13 +03:00
|
|
|
return {
|
|
|
|
protocolVersion: "1",
|
2019-06-20 17:36:19 +03:00
|
|
|
product: (isHeadless ? "Headless " : "") + "Firefox",
|
2019-02-22 02:04:13 +03:00
|
|
|
revision: "1",
|
|
|
|
userAgent: "Firefox",
|
|
|
|
jsVersion: "1.8.5",
|
|
|
|
};
|
|
|
|
}
|
2019-03-10 15:51:05 +03:00
|
|
|
|
|
|
|
close() {
|
|
|
|
Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit);
|
|
|
|
}
|
2019-02-22 02:04:13 +03:00
|
|
|
}
|