Session History interface changes.

This commit is contained in:
radha%netscape.com 1999-06-15 23:27:10 +00:00
Родитель 2fc63fda49
Коммит 67dc51f1c8
2 изменённых файлов: 40 добавлений и 13 удалений

Просмотреть файл

@ -312,6 +312,21 @@ nsBrowserAppCore::SetDocumentCharset(const nsString& aCharset)
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP
nsBrowserAppCore::Back()
{
Back(mContentAreaWebShell);
return NS_OK;
}
NS_IMETHODIMP
nsBrowserAppCore::Forward()
{
Forward(mContentAreaWebShell);
return NS_OK;
}
NS_IMETHODIMP NS_IMETHODIMP
nsBrowserAppCore::Stop() nsBrowserAppCore::Stop()
@ -1186,26 +1201,26 @@ nsBrowserAppCore::OnEndURLLoad(nsIDocumentLoader* loader,
// nsISessionHistory methods // // nsISessionHistory methods //
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
NS_IMETHODIMP NS_IMETHODIMP
nsBrowserAppCore::Back() nsBrowserAppCore::Back(nsIWebShell * aPrev)
{ {
if (mSHistory) { if (mSHistory) {
mSHistory->Back(); mSHistory->Back(aPrev);
} }
// mContentAreaWebShell->Back();
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP NS_IMETHODIMP
nsBrowserAppCore::Forward() nsBrowserAppCore::Forward(nsIWebShell * aPrev)
{ {
if (mSHistory) { if (mSHistory) {
mSHistory->Forward(); mSHistory->Forward(aPrev);
} }
// mContentAreaWebShell->Forward();
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP NS_IMETHODIMP
nsBrowserAppCore::add(nsIWebShell * aWebShell) nsBrowserAppCore::add(nsIWebShell * aWebShell)
{ {
@ -1216,11 +1231,11 @@ nsBrowserAppCore::add(nsIWebShell * aWebShell)
} }
NS_IMETHODIMP NS_IMETHODIMP
nsBrowserAppCore::Goto(PRInt32 aGotoIndex) nsBrowserAppCore::Goto(PRInt32 aGotoIndex, nsIWebShell * aPrev)
{ {
nsresult rv; nsresult rv;
if (mSHistory) if (mSHistory)
rv = mSHistory->Goto(aGotoIndex); rv = mSHistory->Goto(aGotoIndex, aPrev);
return rv; return rv;
} }
@ -1231,6 +1246,13 @@ nsBrowserAppCore::SetLoadingFlag(PRBool aFlag)
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP
nsBrowserAppCore::GetLoadingFlag(PRBool &aFlag)
{
return NS_OK;
}
NS_IMETHODIMP NS_IMETHODIMP
nsBrowserAppCore::SetLoadingHistoryEntry(nsHistoryEntry * aHistoryEntry) nsBrowserAppCore::SetLoadingHistoryEntry(nsHistoryEntry * aHistoryEntry)
{ {

Просмотреть файл

@ -65,6 +65,8 @@ class nsBrowserAppCore : public nsBaseAppCore,
NS_IMETHOD Init(const nsString& aId); NS_IMETHOD Init(const nsString& aId);
NS_IMETHOD GetId(nsString& aId) { return nsBaseAppCore::GetId(aId); } NS_IMETHOD GetId(nsString& aId) { return nsBaseAppCore::GetId(aId); }
NS_IMETHOD Back();
NS_IMETHOD Forward();
NS_IMETHOD Stop(); NS_IMETHOD Stop();
NS_IMETHOD WalletPreview(nsIDOMWindow* aWin, nsIDOMWindow* aForm); 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 OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURL* aURL, const char* aCommand);
NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIURL *aUrl, PRInt32 aStatus, NS_IMETHOD OnEndDocumentLoad(nsIDocumentLoader* loader, nsIURL *aUrl, PRInt32 aStatus,
nsIDocumentLoaderObserver * aObserver); nsIDocumentLoaderObserver * aObserver);
NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIURL* aURL, const char* aContentType, NS_IMETHOD OnStartURLLoad(nsIDocumentLoader* loader, nsIURL* aURL, const char* aContentType,
nsIContentViewer* aViewer); nsIContentViewer* aViewer);
NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIURL* aURL, PRUint32 aProgress, NS_IMETHOD OnProgressURLLoad(nsIDocumentLoader* loader, nsIURL* aURL, PRUint32 aProgress,
@ -129,9 +132,9 @@ class nsBrowserAppCore : public nsBaseAppCore,
// nsISessionHistory methods // nsISessionHistory methods
NS_IMETHOD Forward(); NS_IMETHOD Forward(nsIWebShell * prev);
NS_IMETHOD Back(); NS_IMETHOD Back(nsIWebShell * prev);
NS_IMETHOD canForward(PRBool &aResult); NS_IMETHOD canForward(PRBool &aResult);
@ -139,7 +142,7 @@ class nsBrowserAppCore : public nsBaseAppCore,
NS_IMETHOD add(nsIWebShell * aWebShell); NS_IMETHOD add(nsIWebShell * aWebShell);
NS_IMETHOD Goto(PRInt32 aHistoryIndex); NS_IMETHOD Goto(PRInt32 aHistoryIndex, nsIWebShell * prev);
NS_IMETHOD getHistoryLength(PRInt32 & aResult); NS_IMETHOD getHistoryLength(PRInt32 & aResult);
@ -149,6 +152,8 @@ class nsBrowserAppCore : public nsBaseAppCore,
NS_IMETHOD SetLoadingFlag(PRBool aFlag); NS_IMETHOD SetLoadingFlag(PRBool aFlag);
NS_IMETHOD GetLoadingFlag(PRBool &aFlag);
NS_IMETHOD SetLoadingHistoryEntry(nsHistoryEntry * aHistoryEntry); NS_IMETHOD SetLoadingHistoryEntry(nsHistoryEntry * aHistoryEntry);