tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

JSProcessActor.webidl (2743B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 /**
      8 * An actor architecture designed to allow compositional parent/content
      9 * communications. The lifetime of a JSProcessActor{Child, Parent} is the `ContentParent`
     10 * (for the parent-side) / `ContentChild` (for the child-side).
     11 */
     12 
     13 interface nsISupports;
     14 
     15 /**
     16 * Base class for parent-side actor.
     17 */
     18 [ChromeOnly, Exposed=Window]
     19 interface JSProcessActorParent {
     20  [ChromeOnly]
     21  constructor();
     22 
     23  readonly attribute nsIDOMProcessParent manager;
     24 };
     25 JSProcessActorParent includes JSActor;
     26 
     27 [ChromeOnly, Exposed=Window]
     28 interface JSProcessActorChild {
     29  [ChromeOnly]
     30  constructor();
     31 
     32  readonly attribute nsIDOMProcessChild manager;
     33 };
     34 JSProcessActorChild includes JSActor;
     35 
     36 
     37 /**
     38 * Used by `ChromeUtils.registerProcessActor()` to register actors.
     39 */
     40 dictionary ProcessActorOptions {
     41  /**
     42   * An array of remote type which restricts the actor is allowed to instantiate
     43   * in specific process type. If this is defined, the prefix of process type
     44   * matches the remote type by prefix match is allowed to instantiate, ex: if
     45   * Fission is enabled, the prefix of process type will be `webIsolated`, it
     46   * can prefix match remote type either `web` or `webIsolated`. If not passed,
     47   * all content processes are allowed to instantiate the actor.
     48   */
     49  sequence<UTF8String> remoteTypes;
     50 
     51  /**
     52   * If this is set to `true`, allow this actor to be created for the parent
     53   * process.
     54   */
     55  boolean includeParent = false;
     56 
     57  /**
     58   * If true, the actor will be loaded in the loader dedicated to DevTools.
     59   *
     60   * This ultimately prevents DevTools to debug itself.
     61   */
     62  boolean loadInDevToolsLoader = false;
     63 
     64  /** This fields are used for configuring individual sides of the actor. */
     65  ProcessActorSidedOptions parent;
     66  ProcessActorChildOptions child;
     67 };
     68 
     69 dictionary ProcessActorSidedOptions {
     70  /**
     71   * The ESM path which should be loaded for the actor on this side.
     72   *
     73   * If this is not passed, the specified side cannot receive messages, but may
     74   * send them using `sendAsyncMessage` or `sendQuery`.
     75   */
     76  ByteString esModuleURI;
     77 };
     78 
     79 dictionary ProcessActorChildOptions : ProcessActorSidedOptions {
     80  /**
     81   * An array of observer topics to listen to. An observer will be added for each
     82   * topic in the list.
     83   *
     84   * Unlike for JSWindowActor, observers are always invoked, and do not need to
     85   * pass an inner or outer window as subject.
     86   */
     87  sequence<ByteString> observers;
     88 };