docshell/base/nsIDocShellTreeOwner.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
michael@0 2 *
michael@0 3 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7 #include "nsISupports.idl"
michael@0 8
michael@0 9 /**
michael@0 10 * The nsIDocShellTreeOwner
michael@0 11 */
michael@0 12
michael@0 13 interface nsIDocShellTreeItem;
michael@0 14
michael@0 15 [scriptable, uuid(6cd89e60-1060-491e-8c31-ce969435ec56)]
michael@0 16 interface nsIDocShellTreeOwner : nsISupports
michael@0 17 {
michael@0 18 /*
michael@0 19 Return the child DocShellTreeItem with the specified name.
michael@0 20 name - This is the name of the item that is trying to be found.
michael@0 21 aRequestor - This is the docshellTreeItem that is requesting the find. This
michael@0 22 parameter is used to identify when the child is asking its parent to find
michael@0 23 a child with the specific name. The parent uses this parameter to ensure
michael@0 24 a resursive state does not occur by not again asking the requestor for find
michael@0 25 a shell by the specified name. Inversely the child uses it to ensure it
michael@0 26 does not ask its parent to do the search if its parent is the one that
michael@0 27 asked it to search.
michael@0 28 aOriginalRequestor - The original treeitem that made the request, if any.
michael@0 29 This is used to ensure that we don't run into cross-site issues.
michael@0 30
michael@0 31 */
michael@0 32 nsIDocShellTreeItem findItemWithName(in wstring name,
michael@0 33 in nsIDocShellTreeItem aRequestor,
michael@0 34 in nsIDocShellTreeItem aOriginalRequestor);
michael@0 35
michael@0 36 /**
michael@0 37 * Called when a content shell is added to the docshell tree. This is
michael@0 38 * _only_ called for "root" content shells (that is, ones whose parent is a
michael@0 39 * chrome shell).
michael@0 40 *
michael@0 41 * @param aContentShell the shell being added.
michael@0 42 * @param aPrimary whether the shell is primary.
michael@0 43 * @param aTargetable whether the shell can be a target for named window
michael@0 44 * targeting.
michael@0 45 * @param aID the "id" of the shell. What this actually means is
michael@0 46 * undefined. Don't rely on this for anything.
michael@0 47 */
michael@0 48 void contentShellAdded(in nsIDocShellTreeItem aContentShell,
michael@0 49 in boolean aPrimary, in boolean aTargetable,
michael@0 50 in AString aID);
michael@0 51
michael@0 52 /**
michael@0 53 * Called when a content shell is removed from the docshell tree. This is
michael@0 54 * _only_ called for "root" content shells (that is, ones whose parent is a
michael@0 55 * chrome shell). Note that if aContentShell was never added,
michael@0 56 * contentShellRemoved should just do nothing.
michael@0 57 *
michael@0 58 * @param aContentShell the shell being removed.
michael@0 59 */
michael@0 60 void contentShellRemoved(in nsIDocShellTreeItem aContentShell);
michael@0 61
michael@0 62 /*
michael@0 63 Returns the Primary Content Shell
michael@0 64 */
michael@0 65 readonly attribute nsIDocShellTreeItem primaryContentShell;
michael@0 66
michael@0 67 [implicit_jscontext]
michael@0 68 readonly attribute jsval contentWindow;
michael@0 69
michael@0 70 /*
michael@0 71 Tells the tree owner to size its window or parent window in such a way
michael@0 72 that the shell passed along will be the size specified.
michael@0 73 */
michael@0 74 void sizeShellTo(in nsIDocShellTreeItem shell, in long cx, in long cy);
michael@0 75
michael@0 76 /*
michael@0 77 Sets the persistence of different attributes of the window.
michael@0 78 */
michael@0 79 void setPersistence(in boolean aPersistPosition,
michael@0 80 in boolean aPersistSize,
michael@0 81 in boolean aPersistSizeMode);
michael@0 82
michael@0 83 /*
michael@0 84 Gets the current persistence states of the window.
michael@0 85 */
michael@0 86 void getPersistence(out boolean aPersistPosition,
michael@0 87 out boolean aPersistSize,
michael@0 88 out boolean aPersistSizeMode);
michael@0 89
michael@0 90 /*
michael@0 91 Gets the number of targettable docshells.
michael@0 92 */
michael@0 93 readonly attribute unsigned long targetableShellCount;
michael@0 94 };

mercurial