docshell/base/nsIDocShellTreeOwner.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docshell/base/nsIDocShellTreeOwner.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,94 @@
     1.4 +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     1.5 + *
     1.6 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#include "nsISupports.idl"
    1.11 +
    1.12 +/**
    1.13 + * The nsIDocShellTreeOwner
    1.14 + */
    1.15 +
    1.16 +interface nsIDocShellTreeItem;
    1.17 +
    1.18 +[scriptable, uuid(6cd89e60-1060-491e-8c31-ce969435ec56)]
    1.19 +interface nsIDocShellTreeOwner : nsISupports
    1.20 +{
    1.21 +	/*
    1.22 +	Return the child DocShellTreeItem with the specified name.
    1.23 +	name - This is the name of the item that is trying to be found.
    1.24 +	aRequestor - This is the docshellTreeItem that is requesting the find.  This
    1.25 +	parameter is used to identify when the child is asking its parent to find
    1.26 +	a child with the specific name.  The parent uses this parameter to ensure
    1.27 +	a resursive state does not occur by not again asking the requestor for find
    1.28 +	a shell by the specified name.  Inversely the child uses it to ensure it
    1.29 +	does not ask its parent to do the search if its parent is the one that
    1.30 +	asked it to search.
    1.31 +	aOriginalRequestor - The original treeitem that made the request, if any.
    1.32 +	This is used to ensure that we don't run into cross-site issues.
    1.33 +
    1.34 +	*/
    1.35 +	nsIDocShellTreeItem findItemWithName(in wstring name, 
    1.36 +		in nsIDocShellTreeItem aRequestor,
    1.37 +		in nsIDocShellTreeItem aOriginalRequestor);
    1.38 +
    1.39 +	/**
    1.40 +	 * Called when a content shell is added to the docshell tree.  This is
    1.41 +	 * _only_ called for "root" content shells (that is, ones whose parent is a
    1.42 +	 * chrome shell).
    1.43 +	 *
    1.44 +	 * @param aContentShell the shell being added.
    1.45 +	 * @param aPrimary whether the shell is primary.
    1.46 +	 * @param aTargetable whether the shell can be a target for named window
    1.47 +	 *					targeting.
    1.48 +	 * @param aID the "id" of the shell.  What this actually means is
    1.49 +	 *			undefined. Don't rely on this for anything.
    1.50 +	 */
    1.51 +	void contentShellAdded(in nsIDocShellTreeItem aContentShell,
    1.52 +						   in boolean aPrimary, in boolean aTargetable,
    1.53 +						   in AString aID);
    1.54 +
    1.55 +	/**
    1.56 +	 * Called when a content shell is removed from the docshell tree.  This is
    1.57 +	 * _only_ called for "root" content shells (that is, ones whose parent is a
    1.58 +	 * chrome shell).  Note that if aContentShell was never added,
    1.59 +	 * contentShellRemoved should just do nothing.
    1.60 +	 *
    1.61 +	 * @param aContentShell the shell being removed.
    1.62 +	 */
    1.63 +	void contentShellRemoved(in nsIDocShellTreeItem aContentShell);
    1.64 +
    1.65 +	/*
    1.66 +	Returns the Primary Content Shell
    1.67 +	*/
    1.68 +	readonly attribute nsIDocShellTreeItem primaryContentShell;
    1.69 +
    1.70 +	[implicit_jscontext]
    1.71 +	readonly attribute jsval contentWindow;
    1.72 +
    1.73 +	/*
    1.74 +	Tells the tree owner to size its window or parent window in such a way
    1.75 +	that the shell passed along will be the size specified.
    1.76 +	*/
    1.77 +	void sizeShellTo(in nsIDocShellTreeItem shell, in long cx, in long cy);
    1.78 +
    1.79 +	/*
    1.80 +	Sets the persistence of different attributes of the window.
    1.81 +	*/
    1.82 +	void setPersistence(in boolean aPersistPosition,
    1.83 +                            in boolean aPersistSize,
    1.84 +                            in boolean aPersistSizeMode);
    1.85 +
    1.86 +	/*
    1.87 +	Gets the current persistence states of the window.
    1.88 +	*/
    1.89 +	void getPersistence(out boolean aPersistPosition,
    1.90 +                            out boolean aPersistSize,
    1.91 +                            out boolean aPersistSizeMode);
    1.92 +
    1.93 +	/*
    1.94 +	Gets the number of targettable docshells.
    1.95 +	*/
    1.96 +	readonly attribute unsigned long targetableShellCount;
    1.97 +};

mercurial