mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
New interfaces to nsIsessionHistory added
This commit is contained in:
parent
993eef4613
commit
5a8751c744
@ -156,6 +156,7 @@ nsBrowserAppCore::nsBrowserAppCore()
|
||||
|
||||
nsBrowserAppCore::~nsBrowserAppCore()
|
||||
{
|
||||
|
||||
// We own none of these things, so no need to release
|
||||
//NS_IF_RELEASE(mToolbarWindow)
|
||||
//NS_IF_RELEASE(mToolbarScriptContext);
|
||||
@ -165,6 +166,12 @@ nsBrowserAppCore::~nsBrowserAppCore()
|
||||
//NS_IF_RELEASE(mWebShell);
|
||||
//NS_IF_RELEASE(mContentAreaWebShell);
|
||||
|
||||
if (nsnull != mGHistory) {
|
||||
nsServiceManager::ReleaseService(kCGlobalHistoryCID, mGHistory);
|
||||
}
|
||||
|
||||
NS_IF_RELEASE(mSHistory);
|
||||
|
||||
DecInstanceCount();
|
||||
}
|
||||
|
||||
@ -289,9 +296,6 @@ nsBrowserAppCore::Init(const nsString& aId)
|
||||
kISessionHistoryIID,
|
||||
(void **) &mSHistory);
|
||||
|
||||
if (!mSHistory)
|
||||
printf("********** Couldn't initialize Session History *********\n");
|
||||
|
||||
BeginObserving();
|
||||
|
||||
return rv;
|
||||
@ -1385,6 +1389,23 @@ nsBrowserAppCore::getCurrentIndex(PRInt32 & aResult)
|
||||
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBrowserAppCore::GetURLForIndex(PRInt32 aIndex, const PRUnichar** aURL)
|
||||
{
|
||||
|
||||
if (mSHistory)
|
||||
mSHistory->GetURLForIndex(aIndex, aURL);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBrowserAppCore::SetURLForIndex(PRInt32 aIndex, const PRUnichar* aURL)
|
||||
{
|
||||
if (mSHistory)
|
||||
mSHistory->SetURLForIndex(aIndex, aURL);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
NS_IMETHODIMP
|
||||
cloneHistory(nsISessionHistory * aSessionHistory) {
|
||||
|
@ -157,6 +157,10 @@ class nsBrowserAppCore : public nsBaseAppCore,
|
||||
|
||||
NS_IMETHOD SetLoadingHistoryEntry(nsHistoryEntry * aHistoryEntry);
|
||||
|
||||
NS_IMETHOD GetURLForIndex(PRInt32 aIndex, const PRUnichar ** aURL);
|
||||
|
||||
|
||||
NS_IMETHOD SetURLForIndex(PRInt32 aIndex, const PRUnichar * aURL);
|
||||
|
||||
protected:
|
||||
NS_IMETHOD DoDialog();
|
||||
|
Loading…
Reference in New Issue
Block a user