tor-browser

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

nsIDOMProcessParent.idl (2328B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
      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 #include "nsISupports.idl"
      8 
      9 %{C++
     10 namespace mozilla {
     11 namespace dom {
     12 class ContentParent;
     13 class JSActorManager;
     14 } // namespace dom
     15 } // namespace mozilla
     16 %}
     17 [ptr] native ContentParentPtr(mozilla::dom::ContentParent);
     18 [ptr] native JSActorManagerPtr(mozilla::dom::JSActorManager);
     19 
     20 webidl JSProcessActorParent;
     21 
     22 /**
     23 * Parent actor interface for a process which can host DOM content.
     24 *
     25 * Implemented by either `InProcessParent` for the parent process, or
     26 * `ContentParent` for a content process.
     27 */
     28 [scriptable, builtinclass, uuid(81fc08b9-c901-471f-ab0d-876362eba770)]
     29 interface nsIDOMProcessParent: nsISupports {
     30  /**
     31   * Internal child process ID. `0` is reserved for the parent process.
     32   */
     33  [infallible] readonly attribute unsigned long long childID;
     34 
     35  /**
     36   * OS ID of the process.
     37   */
     38  [infallible] readonly attribute long osPid;
     39 
     40  /**
     41   * Lookup a JSProcessActorParent managed by this interface by name.
     42   */
     43  [implicit_jscontext] JSProcessActorParent getActor(in ACString name);
     44  JSProcessActorParent getExistingActor(in ACString name);
     45 
     46  /** Can the actor still send messages? */
     47  [infallible] readonly attribute boolean canSend;
     48 
     49  [notxpcom, nostdcall] ContentParentPtr AsContentParent();
     50 
     51  /** Cast this nsIDOMProcessParent to a JSActorManager */
     52  [notxpcom, nostdcall] JSActorManagerPtr AsJSActorManager();
     53 
     54  /**
     55   * Remote type of the process.
     56   */
     57  readonly attribute ACString remoteType;
     58 };
     59 
     60 /**
     61 * Reference counted and cycle collected interface to expose a
     62 * UniqueContentParentKeepAlive to chrome JS.
     63 */
     64 [scriptable, builtinclass, uuid(b43907bd-e40d-4bf5-a85e-866998beb7a9)]
     65 interface nsIContentParentKeepAlive: nsISupports {
     66  /**
     67   * Underlying nsIDOMProcessParent which is being kept alive.
     68   */
     69  readonly attribute nsIDOMProcessParent domProcess;
     70 
     71  /**
     72   * Invalidate this nsIContentParentKeepAlive, dropping the keep alive
     73   * and ContentParent reference without waiting for the object to be gc/cc-ed.
     74   */
     75  void invalidateKeepAlive();
     76 };