Bug #10802 --> expose load types to load info class so callers can set the load type
this is needed to implement things like open attachment so we can make the doc shell think a user click happened when it talks to the uriloader. I removed two boolean fields which were representing two load types. Simplified the api by allowing you to pass in any of our load types. r=valeski
This commit is contained in:
@@ -27,10 +27,10 @@
|
||||
//*** nsDocShellLoadInfo: Object Management
|
||||
//*****************************************************************************
|
||||
|
||||
nsDocShellLoadInfo::nsDocShellLoadInfo() : mReplaceSessionHistorySlot(PR_FALSE),
|
||||
mRefresh(PR_FALSE)
|
||||
nsDocShellLoadInfo::nsDocShellLoadInfo()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
mLoadType = nsIDocShellLoadInfo::loadNormal;
|
||||
}
|
||||
|
||||
nsDocShellLoadInfo::~nsDocShellLoadInfo()
|
||||
@@ -68,34 +68,6 @@ NS_IMETHODIMP nsDocShellLoadInfo::SetReferrer(nsIURI* aReferrer)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocShellLoadInfo::GetReplaceSessionHistorySlot(PRBool* aReplace)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aReplace);
|
||||
|
||||
*aReplace = mReplaceSessionHistorySlot;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocShellLoadInfo::SetReplaceSessionHistorySlot(PRBool aReplace)
|
||||
{
|
||||
mReplaceSessionHistorySlot = aReplace;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocShellLoadInfo::GetRefresh(PRBool* aRefresh)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aRefresh);
|
||||
|
||||
*aRefresh = mRefresh;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocShellLoadInfo::SetRefresh(PRBool aRefresh)
|
||||
{
|
||||
mRefresh = aRefresh;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocShellLoadInfo::GetOwner(nsISupports** aOwner)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aOwner);
|
||||
@@ -111,6 +83,20 @@ NS_IMETHODIMP nsDocShellLoadInfo::SetOwner(nsISupports* aOwner)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocShellLoadInfo::GetLoadType(nsDocShellInfoLoadType * aLoadType)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aLoadType);
|
||||
|
||||
*aLoadType = mLoadType;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocShellLoadInfo::SetLoadType(nsDocShellInfoLoadType aLoadType)
|
||||
{
|
||||
mLoadType = aLoadType;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocShellLoadInfo::GetSHEntry(nsISHEntry** aSHEntry)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aSHEntry);
|
||||
@@ -125,6 +111,7 @@ NS_IMETHODIMP nsDocShellLoadInfo::SetSHEntry(nsISHEntry* aSHEntry)
|
||||
mSHEntry = aSHEntry;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// nsDocShellLoadInfo: Helpers
|
||||
//*****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user