gecko-dev/netwerk/base/nsIClassOfService.idl
Honza Bambas 4263c50db2 Bug 1358060 - Allow postponing of unimportant resources opening during page load, class-of-service Tail flag. r=dragana
--HG--
extra : rebase_source : 1ab691fe066e641c948aa5f42827305411579708
2017-08-30 09:32:00 -04:00

58 lines
2.2 KiB
Plaintext

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
/**
* nsIClassOfService.idl
*
* Used to express class dependencies and characteristics - complimentary to
* nsISupportsPriority which is used to express weight
*
* Channels that implement this interface may make use of this
* information in different ways.
*
* The default gecko HTTP/1 stack makes Followers wait for Leaders to
* complete before dispatching followers. Other classes run in
* parallel - neither being blocked nor blocking. All grouping is done
* based on the Load Group - separate load groups proceed
* independently.
*
* HTTP/2 does not use the load group, but prioritization is done per
* HTTP/2 session. HTTP/2 dispatches all the requests as soon as
* possible.
* The various classes are assigned logical priority
* dependency groups and then transactions of that class depend on the
* group. In this model Followers block on Leaders and Speculative
* depends on Background. See Http2Stream.cpp for weighting details.
*
*/
[scriptable, uuid(1ccb58ec-5e07-4cf9-a30d-ac5490d23b41)]
interface nsIClassOfService : nsISupports
{
attribute unsigned long classFlags;
void clearClassFlags(in unsigned long flags);
void addClassFlags(in unsigned long flags);
const unsigned long Leader = 1 << 0;
const unsigned long Follower = 1 << 1;
const unsigned long Speculative = 1 << 2;
const unsigned long Background = 1 << 3;
const unsigned long Unblocked = 1 << 4;
const unsigned long Throttleable = 1 << 5;
const unsigned long UrgentStart = 1 << 6;
const unsigned long DontThrottle = 1 << 7;
// Enforce tailing on this load; any of Leader, Unblocked, UrgentStart, TailForbidden
// overrule this flag (disable tailing.)
const unsigned long Tail = 1 << 8;
// Tailing may be engaged regardless if the load is marked Unblocked when
// some other conditions are met later, like when the load is found to be
// a tracker.
const unsigned long TailAllowed = 1 << 9;
// Tailing not allowed under any circumstances or combination of flags.
const unsigned long TailForbidden = 1 << 10;
};