Remove global history; move to webshell.

This commit is contained in:
waterson%netscape.com 1999-08-05 05:13:34 +00:00
Родитель 9d36bc350c
Коммит 732f94e884
2 изменённых файлов: 0 добавлений и 36 удалений

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

@ -156,7 +156,6 @@ nsBrowserAppCore::nsBrowserAppCore()
mWebShellWin = nsnull;
mWebShell = nsnull;
mContentAreaWebShell = nsnull;
mGHistory = nsnull;
mSHistory = nsnull;
IncInstanceCount();
NS_INIT_REFCNT();
@ -173,11 +172,6 @@ nsBrowserAppCore::~nsBrowserAppCore()
//NS_IF_RELEASE(mWebShellWin);
//NS_IF_RELEASE(mWebShell);
//NS_IF_RELEASE(mContentAreaWebShell);
if (nsnull != mGHistory) {
nsServiceManager::ReleaseService(kCGlobalHistoryCID, mGHistory);
}
NS_IF_RELEASE(mSHistory);
DecInstanceCount();
@ -303,11 +297,6 @@ nsBrowserAppCore::Init(const nsString& aId)
nsServiceManager::ReleaseService(kAppCoresManagerCID, appCoreManager);
}
// Get the Global history service
rv = nsServiceManager::GetService(kCGlobalHistoryCID, kIGlobalHistoryIID,
(nsISupports **)&mGHistory);
if (NS_FAILED(rv)) return rv;
rv = nsComponentManager::CreateInstance(kCSessionHistoryCID,
nsnull,
kISessionHistoryIID,
@ -1195,24 +1184,6 @@ nsBrowserAppCore::OnEndDocumentLoad(nsIDocumentLoader* aLoader, nsIURI *aUrl, PR
// XXX Ignore rv for now. They are using nsIEnumerator instead of
// nsISimpleEnumerator.
// Update global history.
//NS_ASSERTION(mGHistory != nsnull, "history not initialized");
if (mGHistory && mWebShell) {
nsresult rv;
do {
rv = mGHistory->AddPage(url, /* XXX referrer? */ nsnull, PR_Now());
if (NS_FAILED(rv)) break;
const PRUnichar* title;
rv = mWebShell->GetTitle(&title);
if (NS_FAILED(rv)) break;
rv = mGHistory->SetPageTitle(url, title);
if (NS_FAILED(rv)) break;
} while (0);
}
done:
// Stop the throbber and set the urlbar string
if (aStatus == NS_OK)
@ -1703,11 +1674,6 @@ nsBrowserAppCore::Close()
{
EndObserving();
if (nsnull != mGHistory) {
nsServiceManager::ReleaseService(kCGlobalHistoryCID, mGHistory);
}
mGHistory = nsnull;
// Undo other stuff we did in SetContentWindow.
if ( mContentAreaWebShell ) {
mContentAreaWebShell->SetDocLoaderObserver( 0 );

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

@ -42,7 +42,6 @@ class nsIScriptContext;
class nsIDOMWindow;
class nsIURI;
class nsIWebShellWindow;
class nsIGlobalHistory;
class nsIFindComponent;
@ -216,7 +215,6 @@ class nsBrowserAppCore : public nsBaseAppCore,
nsIWebShell * mWebShell; // weak reference
nsIWebShell * mContentAreaWebShell; // weak reference
nsIGlobalHistory* mGHistory; // this is a service
nsISessionHistory* mSHistory; // this is a service
nsCOMPtr<nsISupports> mSearchContext; // at last, something we really own