Bug 891986 - Keep the source ArrayBuffer to a decodeAudioData call alive until the...
[gecko.git] / dom / base / nsHistory.h
blobac6355154bad2627610c5846a0f5aebc0c1362d8
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/. */
6 #ifndef nsHistory_h___
7 #define nsHistory_h___
9 #include "nsIDOMHistory.h"
10 #include "nsISupports.h"
11 #include "nscore.h"
12 #include "nsIScriptContext.h"
13 #include "nsISHistory.h"
14 #include "nsIWeakReference.h"
15 #include "nsPIDOMWindow.h"
17 class nsIDocShell;
19 // Script "History" object
20 class nsHistory : public nsIDOMHistory
22 public:
23 nsHistory(nsPIDOMWindow* aInnerWindow);
24 virtual ~nsHistory();
26 // nsISupports
27 NS_DECL_ISUPPORTS
29 // nsIDOMHistory
30 NS_DECL_NSIDOMHISTORY
32 nsIDocShell *GetDocShell() {
33 nsCOMPtr<nsPIDOMWindow> win(do_QueryReferent(mInnerWindow));
34 if (!win)
35 return nullptr;
36 return win->GetDocShell();
39 void GetWindow(nsPIDOMWindow **aWindow) {
40 nsCOMPtr<nsPIDOMWindow> win(do_QueryReferent(mInnerWindow));
41 *aWindow = win.forget().get();
44 protected:
45 nsresult GetSessionHistoryFromDocShell(nsIDocShell * aDocShell,
46 nsISHistory ** aReturn);
48 nsCOMPtr<nsIWeakReference> mInnerWindow;
51 #endif /* nsHistory_h___ */