diff --git a/xpfe/AppCores/src/nsBrowserAppCore.cpp b/xpfe/AppCores/src/nsBrowserAppCore.cpp index cc191118687d..8e57a641b446 100644 --- a/xpfe/AppCores/src/nsBrowserAppCore.cpp +++ b/xpfe/AppCores/src/nsBrowserAppCore.cpp @@ -312,6 +312,21 @@ nsBrowserAppCore::SetDocumentCharset(const nsString& aCharset) return NS_OK; } +NS_IMETHODIMP +nsBrowserAppCore::Back() +{ + Back(mContentAreaWebShell); + return NS_OK; +} + +NS_IMETHODIMP +nsBrowserAppCore::Forward() +{ + Forward(mContentAreaWebShell); + return NS_OK; +} + + NS_IMETHODIMP nsBrowserAppCore::Stop() @@ -1081,7 +1096,7 @@ nsBrowserAppCore::OnEndDocumentLoad(nsIDocumentLoader* aLoader, nsIURL *aUrl, PR done: // Stop the throbber and set the urlbar string if (aStatus == NS_OK) - setAttribute( mWebShell, "urlbar", "value", url); + setAttribute( mWebShell, "urlbar", "value", url); /* To satisfy a request from the QA group */ if (aStatus == NS_OK) { @@ -1186,26 +1201,26 @@ nsBrowserAppCore::OnEndURLLoad(nsIDocumentLoader* loader, // nsISessionHistory methods // //////////////////////////////////////////////////////// + NS_IMETHODIMP -nsBrowserAppCore::Back() +nsBrowserAppCore::Back(nsIWebShell * aPrev) { if (mSHistory) { - mSHistory->Back(); + mSHistory->Back(aPrev); } - // mContentAreaWebShell->Back(); return NS_OK; } NS_IMETHODIMP -nsBrowserAppCore::Forward() +nsBrowserAppCore::Forward(nsIWebShell * aPrev) { if (mSHistory) { - mSHistory->Forward(); + mSHistory->Forward(aPrev); } - // mContentAreaWebShell->Forward(); return NS_OK; } + NS_IMETHODIMP nsBrowserAppCore::add(nsIWebShell * aWebShell) { @@ -1216,11 +1231,11 @@ nsBrowserAppCore::add(nsIWebShell * aWebShell) } NS_IMETHODIMP -nsBrowserAppCore::Goto(PRInt32 aGotoIndex) +nsBrowserAppCore::Goto(PRInt32 aGotoIndex, nsIWebShell * aPrev) { nsresult rv; if (mSHistory) - rv = mSHistory->Goto(aGotoIndex); + rv = mSHistory->Goto(aGotoIndex, aPrev); return rv; } @@ -1231,6 +1246,13 @@ nsBrowserAppCore::SetLoadingFlag(PRBool aFlag) return NS_OK; } + +NS_IMETHODIMP +nsBrowserAppCore::GetLoadingFlag(PRBool &aFlag) +{ + return NS_OK; +} + NS_IMETHODIMP nsBrowserAppCore::SetLoadingHistoryEntry(nsHistoryEntry * aHistoryEntry) { diff --git a/xpfe/AppCores/src/nsBrowserAppCore.h b/xpfe/AppCores/src/nsBrowserAppCore.h index b61d1a8922c6..c0713610ce2a 100644 --- a/xpfe/AppCores/src/nsBrowserAppCore.h +++ b/xpfe/AppCores/src/nsBrowserAppCore.h @@ -65,6 +65,8 @@ class nsBrowserAppCore : public nsBaseAppCore, NS_IMETHOD Init(const nsString& aId); NS_IMETHOD GetId(nsString& aId) { return nsBaseAppCore::GetId(aId); } + NS_IMETHOD Back(); + NS_IMETHOD Forward(); NS_IMETHOD Stop(); NS_IMETHOD WalletPreview(nsIDOMWindow* aWin, nsIDOMWindow* aForm); @@ -95,6 +97,7 @@ class nsBrowserAppCore : public nsBaseAppCore, NS_IMETHOD OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURL* aURL, const char* aCommand); NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIURL *aUrl, PRInt32 aStatus, nsIDocumentLoaderObserver * aObserver); + NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIURL* aURL, const char* aContentType, nsIContentViewer* aViewer); NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIURL* aURL, PRUint32 aProgress, @@ -129,9 +132,9 @@ class nsBrowserAppCore : public nsBaseAppCore, // nsISessionHistory methods - NS_IMETHOD Forward(); + NS_IMETHOD Forward(nsIWebShell * prev); - NS_IMETHOD Back(); + NS_IMETHOD Back(nsIWebShell * prev); NS_IMETHOD canForward(PRBool &aResult); @@ -139,7 +142,7 @@ class nsBrowserAppCore : public nsBaseAppCore, NS_IMETHOD add(nsIWebShell * aWebShell); - NS_IMETHOD Goto(PRInt32 aHistoryIndex); + NS_IMETHOD Goto(PRInt32 aHistoryIndex, nsIWebShell * prev); NS_IMETHOD getHistoryLength(PRInt32 & aResult); @@ -149,6 +152,8 @@ class nsBrowserAppCore : public nsBaseAppCore, NS_IMETHOD SetLoadingFlag(PRBool aFlag); + NS_IMETHOD GetLoadingFlag(PRBool &aFlag); + NS_IMETHOD SetLoadingHistoryEntry(nsHistoryEntry * aHistoryEntry); @@ -171,7 +176,7 @@ class nsBrowserAppCore : public nsBaseAppCore, nsIWebShell * mContentAreaWebShell; nsIGlobalHistory* mGHistory; - nsISessionHistory * mSHistory; + nsISessionHistory * mSHistory; nsISupports * mSearchContext; };