Bug #20698 --> add new uri load command for loading in the background.
When creating the channel, if the uri load command is viewBackground then set the load flag on the channel appropriately. git-svn-id: svn://10.0.0.236/trunk@55555 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -112,6 +112,7 @@ interface nsIURILoader : nsISupports
|
||||
const long viewSource = 1;
|
||||
const long viewUserClick = 2;
|
||||
const long viewNewWindow = 3;
|
||||
const long viewNormalBackground = 4;
|
||||
|
||||
/* mscott -> I'm going to move this out into a separate private interface
|
||||
*/
|
||||
|
||||
@@ -159,8 +159,12 @@ nsresult nsDocumentOpenInfo::Open(nsIURI *aURI,
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
nsCOMPtr<nsIChannel> aChannel;
|
||||
nsLoadFlags loadFlags = nsIChannel::LOAD_NORMAL;
|
||||
if (aCommand == nsIURILoader::viewNormalBackground)
|
||||
loadFlags = nsIChannel::LOAD_BACKGROUND;
|
||||
|
||||
rv = pNetService->NewChannelFromURI("", aURI, aLoadGroup, requestor,
|
||||
nsIChannel::LOAD_NORMAL, aReferringURI, 0, 0,
|
||||
loadFlags, aReferringURI, 0, 0,
|
||||
getter_AddRefs(aChannel));
|
||||
if (NS_FAILED(rv)) return rv; // uhoh we were unable to get a channel to handle the url!!!
|
||||
// figure out if we need to set the post data stream on the channel...right now,
|
||||
|
||||
Reference in New Issue
Block a user