"Fossies" - the Fresh Open Source Software Archive

Member "UXP-2019.10.31/docshell/base/nsIDocShellTreeOwner.idl" (30 Oct 2019, 3434 Bytes) of package /linux/www/UXP-2019.10.31.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) IDL source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    2  *
    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 /**
   10  * The nsIDocShellTreeOwner
   11  */
   12 
   13 interface nsIDocShellTreeItem;
   14 interface nsITabParent;
   15 
   16 [scriptable, uuid(0e3dc4b1-4cea-4a37-af71-79f0afd07574)]
   17 interface nsIDocShellTreeOwner : nsISupports
   18 {
   19     /**
   20      * Called when a content shell is added to the docshell tree.  This is
   21      * _only_ called for "root" content shells (that is, ones whose parent is a
   22      * chrome shell).
   23      *
   24      * @param aContentShell the shell being added.
   25      * @param aPrimary whether the shell is primary.
   26      * @param aTargetable whether the shell can be a target for named window
   27      *                  targeting.
   28      * @param aID the "id" of the shell.  What this actually means is
   29      *          undefined. Don't rely on this for anything.
   30      */
   31     void contentShellAdded(in nsIDocShellTreeItem aContentShell,
   32                            in boolean aPrimary, in boolean aTargetable,
   33                            in AString aID);
   34 
   35     /**
   36      * Called when a content shell is removed from the docshell tree.  This is
   37      * _only_ called for "root" content shells (that is, ones whose parent is a
   38      * chrome shell).  Note that if aContentShell was never added,
   39      * contentShellRemoved should just do nothing.
   40      *
   41      * @param aContentShell the shell being removed.
   42      */
   43     void contentShellRemoved(in nsIDocShellTreeItem aContentShell);
   44 
   45     /*
   46     Returns the Primary Content Shell
   47     */
   48     readonly attribute nsIDocShellTreeItem primaryContentShell;
   49 
   50     void tabParentAdded(in nsITabParent aTab, in boolean aPrimary);
   51     void tabParentRemoved(in nsITabParent aTab);
   52 
   53     /*
   54     In multiprocess case we may not have primaryContentShell but
   55     primaryTabParent.
   56      */
   57     readonly attribute nsITabParent primaryTabParent;
   58 
   59     /*
   60     Tells the tree owner to size its window or parent window in such a way
   61     that the shell passed along will be the size specified.
   62     */
   63     void sizeShellTo(in nsIDocShellTreeItem shell, in long cx, in long cy);
   64 
   65     /*
   66     Gets the size of the primary content area in CSS pixels. This should work
   67     for both in-process and out-of-process content areas.
   68     */
   69     void getPrimaryContentSize(out long width, out long height);
   70     /*
   71     Sets the size of the primary content area in CSS pixels. This should work
   72     for both in-process and out-of-process content areas.
   73     */
   74     void setPrimaryContentSize(in long width, in long height);
   75 
   76     /*
   77     Gets the size of the root docshell in CSS pixels.
   78     */
   79     void getRootShellSize(out long width, out long height);
   80     /*
   81     Sets the size of the root docshell in CSS pixels.
   82     */
   83     void setRootShellSize(in long width, in long height);
   84 
   85     /*
   86     Sets the persistence of different attributes of the window.
   87     */
   88     void setPersistence(in boolean aPersistPosition,
   89                             in boolean aPersistSize,
   90                             in boolean aPersistSizeMode);
   91 
   92     /*
   93     Gets the current persistence states of the window.
   94     */
   95     void getPersistence(out boolean aPersistPosition,
   96                             out boolean aPersistSize,
   97                             out boolean aPersistSizeMode);
   98 
   99     /*
  100     Gets the number of targettable docshells.
  101     */
  102     readonly attribute unsigned long targetableShellCount;
  103 
  104     /*
  105     Returns true if there is a primary content shell or a primary
  106     tab parent.
  107     */
  108     readonly attribute bool hasPrimaryContent;
  109 };