forked from mirrors/gecko-dev
This adds the basic framework for defining IPC actors which are lazily instantiated for the appropriate frame loaders based on DOM events, message manager messages, and observers. Actual actors are defined in follow-up commits. MozReview-Commit-ID: Jb6CWWW7v3v --HG-- extra : rebase_source : 6c465c492ef423616346d70047c4fd4b074af303
27 lines
766 B
JavaScript
27 lines
766 B
JavaScript
/* vim: set ts=2 sw=2 sts=2 et tw=80: */
|
|
/* 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 = ["ActorChild"];
|
|
|
|
/**
|
|
* This should be the base class of any actor class registered via
|
|
* ActorManagerParent and implemented in the child process. It currently takes
|
|
* care of setting the `mm`, `content`, and `docShell` properties based on the
|
|
* message manager it's bound to, but may do more in the future.
|
|
*/
|
|
class ActorChild {
|
|
constructor(mm) {
|
|
this.mm = mm;
|
|
}
|
|
|
|
get content() {
|
|
return this.mm.content;
|
|
}
|
|
|
|
get docShell() {
|
|
return this.mm.docShell;
|
|
}
|
|
}
|