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;
}
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)
{

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

@ -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;
};