tor-browser

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

nsIDOMProcessChild.idl (1864B)


      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 ContentChild;
     13 class JSActorManager;
     14 } // namespace dom
     15 } // namespace mozilla
     16 %}
     17 [ptr] native ContentChildPtr(mozilla::dom::ContentChild);
     18 [ptr] native JSActorManagerPtr(mozilla::dom::JSActorManager);
     19 
     20 webidl JSProcessActorChild;
     21 
     22 /**
     23 * Child actor interface for a process which can host DOM content.
     24 *
     25 * Implemented by either `InProcessChild` for the parent process, or
     26 * `ContentChild` for a content process.
     27 */
     28 [scriptable, builtinclass, uuid(b0c6e5f3-02f1-4f11-a0af-336fc231f3bf)]
     29 interface nsIDOMProcessChild: nsISupports {
     30  %{C++
     31  /**
     32   * Get the nsIDOMProcessChild singleton for this content process. This will
     33   * either be an InProcessChild in the parent process, or ContentChild in the
     34   * child process.
     35   *
     36   * Implemented in ContentChild.cpp
     37   */
     38  static nsIDOMProcessChild* GetSingleton();
     39  %}
     40 
     41  /**
     42   * Internal child process ID. `0` is reserved for the parent process.
     43   */
     44  [infallible] readonly attribute unsigned long long childID;
     45 
     46  /**
     47   * Lookup a JSProcessActorChild managed by this interface by name.
     48   */
     49  [implicit_jscontext] JSProcessActorChild getActor(in ACString name);
     50  JSProcessActorChild getExistingActor(in ACString name);
     51 
     52  /** Can the actor still send messages? */
     53  [infallible] readonly attribute boolean canSend;
     54 
     55  [notxpcom, nostdcall] ContentChildPtr AsContentChild();
     56 
     57  /** Cast this nsIDOMProcessChild to a JSActorManager */
     58  [notxpcom, nostdcall] JSActorManagerPtr AsJSActorManager();
     59 };