Bug 401174 - Allow how exthandler adds downloads to history to be overridden. r=biesi, sr=bz, a=mconnor

This commit is contained in:
2007-11-23 12:20:41 -08:00
parent a413577b9e
commit 09c36b7f53
12 changed files with 462 additions and 32 deletions

View File

@@ -66,6 +66,9 @@
#include "nsGlobalHistoryAdapter.h"
#include "nsGlobalHistory2Adapter.h"
// download history
#include "nsDownloadHistory.h"
static PRBool gInitialized = PR_FALSE;
// The one time initialization for this module
@@ -119,6 +122,9 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsSHEntry)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSHTransaction)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSHistory)
// download history
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDownloadHistory)
// Currently no-one is instantiating docshell's directly because
// nsWebShell is still our main "shell" class. nsWebShell is a subclass
// of nsDocShell. Once migration is complete, docshells will be the main
@@ -240,7 +246,11 @@ static const nsModuleComponentInfo gDocShellModuleInfo[] = {
nsGlobalHistoryAdapter::RegisterSelf },
{ "nsGlobalHistory2Adapter", NS_GLOBALHISTORY2ADAPTER_CID,
nsnull, nsGlobalHistory2Adapter::Create,
nsGlobalHistory2Adapter::RegisterSelf }
nsGlobalHistory2Adapter::RegisterSelf },
// download history
{ "nsDownloadHistory", NS_DOWNLOADHISTORY_CID,
NS_DOWNLOADHISTORY_CONTRACTID, nsDownloadHistoryConstructor }
};
// "docshell provider" to illustrate that this thing really *should*