1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 sw=2 et tw=79: */
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/. */
9 #include "nsIDOMHistory.h"
10 #include "nsISupports.h"
12 #include "nsIScriptContext.h"
13 #include "nsISHistory.h"
14 #include "nsIWeakReference.h"
15 #include "nsPIDOMWindow.h"
19 // Script "History" object
20 class nsHistory
: public nsIDOMHistory
23 nsHistory(nsPIDOMWindow
* aInnerWindow
);
32 nsIDocShell
*GetDocShell() {
33 nsCOMPtr
<nsPIDOMWindow
> win(do_QueryReferent(mInnerWindow
));
36 return win
->GetDocShell();
39 void GetWindow(nsPIDOMWindow
**aWindow
) {
40 nsCOMPtr
<nsPIDOMWindow
> win(do_QueryReferent(mInnerWindow
));
41 *aWindow
= win
.forget().get();
45 nsresult
GetSessionHistoryFromDocShell(nsIDocShell
* aDocShell
,
46 nsISHistory
** aReturn
);
48 nsCOMPtr
<nsIWeakReference
> mInnerWindow
;
51 #endif /* nsHistory_h___ */