2019-01-29 15:18:42 +00: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 = ["Domain"];
|
|
|
|
|
|
|
|
const {EventEmitter} = ChromeUtils.import("chrome://remote/content/EventEmitter.jsm");
|
|
|
|
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
|
|
|
|
2019-02-12 13:58:23 +00:00
|
|
|
class Domain {
|
2019-01-29 15:18:42 +00:00
|
|
|
constructor(session, target) {
|
|
|
|
this.session = session;
|
|
|
|
this.target = target;
|
|
|
|
this.name = this.constructor.name;
|
|
|
|
|
|
|
|
EventEmitter.decorate(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
destructor() {}
|
|
|
|
|
2019-02-11 18:05:12 +00:00
|
|
|
get content() {
|
|
|
|
return this.session.content;
|
2019-01-29 15:18:42 +00:00
|
|
|
}
|
|
|
|
|
2019-02-11 18:05:12 +00:00
|
|
|
get docShell() {
|
|
|
|
return this.session.docShell;
|
|
|
|
}
|
|
|
|
|
|
|
|
get chromeEventHandler() {
|
|
|
|
return this.docShell.chromeEventHandler;
|
2019-01-29 15:18:42 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
XPCOMUtils.defineLazyModuleGetters(Domain, {
|
|
|
|
Log: "chrome://remote/content/domain/Log.jsm",
|
|
|
|
Network: "chrome://remote/content/domain/Network.jsm",
|
|
|
|
Page: "chrome://remote/content/domain/Page.jsm",
|
|
|
|
Runtime: "chrome://remote/content/domain/Runtime.jsm",
|
|
|
|
});
|