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.
This commit is contained in:
mscott%netscape.com 1999-12-07 07:14:40 +00:00
Родитель e4d7924c04
Коммит 6e38a72544
2 изменённых файлов: 6 добавлений и 1 удалений

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

@ -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,