зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
e4d7924c04
Коммит
6e38a72544
|
@ -112,6 +112,7 @@ interface nsIURILoader : nsISupports
|
||||||
const long viewSource = 1;
|
const long viewSource = 1;
|
||||||
const long viewUserClick = 2;
|
const long viewUserClick = 2;
|
||||||
const long viewNewWindow = 3;
|
const long viewNewWindow = 3;
|
||||||
|
const long viewNormalBackground = 4;
|
||||||
|
|
||||||
/* mscott -> I'm going to move this out into a separate private interface
|
/* 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))
|
if (NS_SUCCEEDED(rv))
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIChannel> aChannel;
|
nsCOMPtr<nsIChannel> aChannel;
|
||||||
|
nsLoadFlags loadFlags = nsIChannel::LOAD_NORMAL;
|
||||||
|
if (aCommand == nsIURILoader::viewNormalBackground)
|
||||||
|
loadFlags = nsIChannel::LOAD_BACKGROUND;
|
||||||
|
|
||||||
rv = pNetService->NewChannelFromURI("", aURI, aLoadGroup, requestor,
|
rv = pNetService->NewChannelFromURI("", aURI, aLoadGroup, requestor,
|
||||||
nsIChannel::LOAD_NORMAL, aReferringURI, 0, 0,
|
loadFlags, aReferringURI, 0, 0,
|
||||||
getter_AddRefs(aChannel));
|
getter_AddRefs(aChannel));
|
||||||
if (NS_FAILED(rv)) return rv; // uhoh we were unable to get a channel to handle the url!!!
|
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,
|
// figure out if we need to set the post data stream on the channel...right now,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче