1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
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 #ifndef nsDOMWindowList_h___
7 #define nsDOMWindowList_h___
11 #include "nsIDocShell.h"
16 class nsDOMWindowList final
{
18 explicit nsDOMWindowList(nsIDocShell
* aDocShell
);
20 NS_INLINE_DECL_REFCOUNTING(nsDOMWindowList
)
23 already_AddRefed
<nsPIDOMWindowOuter
> IndexedGetter(uint32_t aIndex
);
24 already_AddRefed
<nsPIDOMWindowOuter
> NamedItem(const nsAString
& aName
);
27 void SetDocShell(nsIDocShell
* aDocShell
);
28 already_AddRefed
<nsIDocShellTreeItem
> GetDocShellTreeItemAt(uint32_t aIndex
) {
30 nsCOMPtr
<nsIDocShellTreeItem
> item
;
32 mDocShellNode
->GetChildAt(aIndex
, getter_AddRefs(item
));
40 // Note: this function may flush and cause mDocShellNode to become null.
43 nsIDocShell
* mDocShellNode
; // Weak Reference
46 #endif // nsDOMWindowList_h___