docshell/base/nsIDocShellTreeOwner.idl

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

mercurial