1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef nsDOMWindowList_h___
6 #define nsDOMWindowList_h___
9 #include "nsIDOMWindowCollection.h"
11 #include "nsIDocShell.h"
16 class nsDOMWindowList
: public nsIDOMWindowCollection
19 explicit nsDOMWindowList(nsIDocShell
* aDocShell
);
22 NS_DECL_NSIDOMWINDOWCOLLECTION
25 already_AddRefed
<nsIDOMWindow
> IndexedGetter(uint32_t aIndex
, bool& aFound
);
28 NS_IMETHOD
SetDocShell(nsIDocShell
* aDocShell
);
29 already_AddRefed
<nsIDocShellTreeItem
> GetDocShellTreeItemAt(uint32_t aIndex
)
32 nsCOMPtr
<nsIDocShellTreeItem
> item
;
34 mDocShellNode
->GetChildAt(aIndex
, getter_AddRefs(item
));
40 virtual ~nsDOMWindowList();
42 // Note: this function may flush and cause mDocShellNode to become null.
45 nsIDocShell
* mDocShellNode
; //Weak Reference
48 #endif // nsDOMWindowList_h___