michael@0: /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: /** michael@0: * The nsIDocShellTreeOwner michael@0: */ michael@0: michael@0: interface nsIDocShellTreeItem; michael@0: michael@0: [scriptable, uuid(6cd89e60-1060-491e-8c31-ce969435ec56)] michael@0: interface nsIDocShellTreeOwner : nsISupports michael@0: { michael@0: /* michael@0: Return the child DocShellTreeItem with the specified name. michael@0: name - This is the name of the item that is trying to be found. michael@0: aRequestor - This is the docshellTreeItem that is requesting the find. This michael@0: parameter is used to identify when the child is asking its parent to find michael@0: a child with the specific name. The parent uses this parameter to ensure michael@0: a resursive state does not occur by not again asking the requestor for find michael@0: a shell by the specified name. Inversely the child uses it to ensure it michael@0: does not ask its parent to do the search if its parent is the one that michael@0: asked it to search. michael@0: aOriginalRequestor - The original treeitem that made the request, if any. michael@0: This is used to ensure that we don't run into cross-site issues. michael@0: michael@0: */ michael@0: nsIDocShellTreeItem findItemWithName(in wstring name, michael@0: in nsIDocShellTreeItem aRequestor, michael@0: in nsIDocShellTreeItem aOriginalRequestor); michael@0: michael@0: /** michael@0: * Called when a content shell is added to the docshell tree. This is michael@0: * _only_ called for "root" content shells (that is, ones whose parent is a michael@0: * chrome shell). michael@0: * michael@0: * @param aContentShell the shell being added. michael@0: * @param aPrimary whether the shell is primary. michael@0: * @param aTargetable whether the shell can be a target for named window michael@0: * targeting. michael@0: * @param aID the "id" of the shell. What this actually means is michael@0: * undefined. Don't rely on this for anything. michael@0: */ michael@0: void contentShellAdded(in nsIDocShellTreeItem aContentShell, michael@0: in boolean aPrimary, in boolean aTargetable, michael@0: in AString aID); michael@0: michael@0: /** michael@0: * Called when a content shell is removed from the docshell tree. This is michael@0: * _only_ called for "root" content shells (that is, ones whose parent is a michael@0: * chrome shell). Note that if aContentShell was never added, michael@0: * contentShellRemoved should just do nothing. michael@0: * michael@0: * @param aContentShell the shell being removed. michael@0: */ michael@0: void contentShellRemoved(in nsIDocShellTreeItem aContentShell); michael@0: michael@0: /* michael@0: Returns the Primary Content Shell michael@0: */ michael@0: readonly attribute nsIDocShellTreeItem primaryContentShell; michael@0: michael@0: [implicit_jscontext] michael@0: readonly attribute jsval contentWindow; michael@0: michael@0: /* michael@0: Tells the tree owner to size its window or parent window in such a way michael@0: that the shell passed along will be the size specified. michael@0: */ michael@0: void sizeShellTo(in nsIDocShellTreeItem shell, in long cx, in long cy); michael@0: michael@0: /* michael@0: Sets the persistence of different attributes of the window. michael@0: */ michael@0: void setPersistence(in boolean aPersistPosition, michael@0: in boolean aPersistSize, michael@0: in boolean aPersistSizeMode); michael@0: michael@0: /* michael@0: Gets the current persistence states of the window. michael@0: */ michael@0: void getPersistence(out boolean aPersistPosition, michael@0: out boolean aPersistSize, michael@0: out boolean aPersistSizeMode); michael@0: michael@0: /* michael@0: Gets the number of targettable docshells. michael@0: */ michael@0: readonly attribute unsigned long targetableShellCount; michael@0: };