Added a CreateLoadInfo to nsIDocShell to facilitate creating a loadInfo object without having to go through xpcom. This also allows the docshell to do any setup it may need to do.

git-svn-id: svn://10.0.0.236/trunk@64601 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
tbogard%aol.net
2000-03-30 12:52:02 +00:00
parent 4990287698
commit e00bf6eecd
4 changed files with 25 additions and 4 deletions

View File

@@ -21,7 +21,6 @@
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#include "nsDocShell.h"
#include "nsIComponentManager.h"
#include "nsIContent.h"
#include "nsIDocument.h"
@@ -43,6 +42,10 @@
#include "nsGfxCIID.h"
#include "nsIPrompt.h" // as long as ReportScriptError raises an alert box.
// Local Includes
#include "nsDocShell.h"
#include "nsDocShellLoadInfo.h"
// Interfaces Needed
#include "nsIGlobalHistory.h"
#include "nsIHTTPChannel.h"
@@ -195,6 +198,17 @@ NS_IMETHODIMP nsDocShell::LoadURI(nsIURI* aURI, nsIURI* aReferrer)
return NS_OK;
}
NS_IMETHODIMP nsDocShell::CreateLoadInfo(nsIDocShellLoadInfo** aLoadInfo)
{
nsDocShellLoadInfo* loadInfo = new nsDocShellLoadInfo();
NS_ENSURE_TRUE(loadInfo, NS_ERROR_OUT_OF_MEMORY);
nsCOMPtr<nsIDocShellLoadInfo> localRef(loadInfo);
*aLoadInfo = localRef;
NS_ADDREF(*aLoadInfo);
return NS_OK;
}
NS_IMETHODIMP nsDocShell::StopLoad()
{
if(mLoadCookie)