Bug 1861709 replace AudioCallbackDriver::ThreadRunning() assertions that mean to...
[gecko.git] / netwerk / base / nsIInterceptionInfo.idl
blobd3c1b030ac551e5d3a16b03350051516fe84e2b7
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: ft=cpp tw=78 sw=2 et ts=2 sts=2 cin
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsISupports.idl"
8 #include "nsIContentPolicy.idl"
10 interface nsIPrincipal;
11 interface nsIRedirectHistoryEntry;
13 %{C++
14 #include "nsTArray.h"
17 [ref] native nsIRedirectHistoryEntryArray(const nsTArray<nsCOMPtr<nsIRedirectHistoryEntry>>);
18 /**
19 * nsIInterceptionInfo is used to record the needed information of the
20 * InterceptedHttpChannel.
21 * This infomration need to be propagated to the new channel which created by
22 * FetchEvent.request or ServiceWorker NavigationPreload.
24 [scriptable, builtinclass, uuid(8b9cd81f-3cd1-4f6a-9086-92a9bbf055f4)]
25 interface nsIInterceptionInfo : nsISupports
27 /**
28 * InterceptedHttpChannel's triggering principal
30 [noscript, notxpcom, nostdcall, binaryname(TriggeringPrincipal)]
31 nsIPrincipal binaryTriggeringPrincipal();
33 [noscript, notxpcom, nostdcall, binaryname(SetTriggeringPrincipal)]
34 void binarySetTriggeringPrincipal(in nsIPrincipal aPrincipal);
36 /**
37 * InterceptedHttpChannel's content policy type
39 [noscript, notxpcom, nostdcall, binaryname(ContentPolicyType)]
40 nsContentPolicyType binaryContentPolicyType();
42 [noscript, notxpcom, nostdcall, binaryname(ExternalContentPolicyType)]
43 nsContentPolicyType binaryExternalContentPolicyType();
45 [noscript, notxpcom, nostdcall, binaryname(SetContentPolicyType)]
46 void binarySetContentPolicyType(in nsContentPolicyType aContentPolicyType);
48 %{ C++
49 inline ExtContentPolicyType GetExtContentPolicyType()
51 return static_cast<ExtContentPolicyType>(ExternalContentPolicyType());
55 /**
56 * The InterceptedHttpChannel's redirect chain
58 [noscript, notxpcom, nostdcall, binaryname(RedirectChain)]
59 nsIRedirectHistoryEntryArray binaryRedirectChain();
61 [noscript, notxpcom, nostdcall, binaryname(SetRedirectChain)]
62 void binarySetRedirectChain(
63 in nsIRedirectHistoryEntryArray aRedirectChain);
65 /**
66 * The InterceptedHttpChannel is a third party channel or not.
68 [noscript, notxpcom, nostdcall, binaryname(FromThirdParty)]
69 bool binaryFromThirdParty();
71 [noscript, notxpcom, nostdcall, binaryname(SetFromThirdParty)]
72 void binarySetFromThirdParty(in bool aFromThirdParty);