1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 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/. */
7 #include
"nsISupports.idl"
10 * The nsIDocShellTreeOwner
13 interface nsIDocShellTreeItem
;
14 interface nsIRemoteTab
;
15 webidl BrowsingContext
;
17 [scriptable
, uuid(0e3dc4b1
-4cea
-4a37
-af71
-79f0afd07574
)]
18 interface nsIDocShellTreeOwner
: nsISupports
21 * Called when a content shell is added to the docshell tree. This is
22 * _only_ called for "root" content shells (that is, ones whose parent is a
25 * @param aContentShell the shell being added.
26 * @param aPrimary whether the shell is primary.
28 void contentShellAdded
(in nsIDocShellTreeItem aContentShell
,
32 * Called when a content shell is removed from the docshell tree. This is
33 * _only_ called for "root" content shells (that is, ones whose parent is a
34 * chrome shell). Note that if aContentShell was never added,
35 * contentShellRemoved should just do nothing.
37 * @param aContentShell the shell being removed.
39 void contentShellRemoved
(in nsIDocShellTreeItem aContentShell
);
42 Returns the Primary Content Shell
44 readonly attribute nsIDocShellTreeItem primaryContentShell
;
46 void remoteTabAdded
(in nsIRemoteTab aTab
, in boolean aPrimary
);
47 void remoteTabRemoved
(in nsIRemoteTab aTab
);
50 In multiprocess case we may not have primaryContentShell but
53 readonly attribute nsIRemoteTab primaryRemoteTab
;
56 Get the BrowsingContext associated with either the primary content shell or
57 primary remote tab, depending on which is available.
59 readonly attribute BrowsingContext primaryContentBrowsingContext
;
62 Tells the tree owner to size its window or parent window in such a way
63 that the shell passed along will be the size specified.
66 void sizeShellTo
(in nsIDocShellTreeItem shell
, in long cx
, in long cy
);
69 Gets the size of the primary content area in device pixels. This should work
70 for both in-process and out-of-process content areas.
72 void getPrimaryContentSize
(out long width
, out long height
);
74 Sets the size of the primary content area in device pixels. This should work
75 for both in-process and out-of-process content areas.
77 void setPrimaryContentSize
(in long width
, in long height
);
80 Gets the size of the root docshell in device pixels.
82 void getRootShellSize
(out long width
, out long height
);
84 Sets the size of the root docshell in device pixels.
86 void setRootShellSize
(in long width
, in long height
);
89 Sets the persistence of different attributes of the window.
91 void setPersistence
(in boolean aPersistPosition
,
92 in boolean aPersistSize
,
93 in boolean aPersistSizeMode
);
96 Gets the current persistence states of the window.
98 void getPersistence
(out boolean aPersistPosition
,
99 out boolean aPersistSize
,
100 out boolean aPersistSizeMode
);
103 Gets the number of tabs currently open in our window, assuming
104 this tree owner has such a concept.
106 readonly attribute
unsigned long tabCount
;
109 Returns true if there is a primary content shell or a primary
112 readonly attribute bool hasPrimaryContent
;