Bug 1873666 [wpt PR 43897] - Add VideoTrackGenerator IDL tests, a=testonly
[gecko.git] / netwerk / base / TRRLoadInfo.h
blob2e08abe1007b9965f56556ddf696b557b76e2e7d
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
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 #ifndef mozilla_TRRLoadInfo_h
8 #define mozilla_TRRLoadInfo_h
10 #include "nsILoadInfo.h"
11 #include "nsIURI.h"
12 #include "nsTArray.h"
13 #include "mozilla/dom/ClientInfo.h"
14 #include "mozilla/dom/ServiceWorkerDescriptor.h"
15 #include "mozilla/OriginAttributes.h"
17 namespace mozilla {
18 namespace net {
20 // TRRLoadInfo is designed to be used by TRRServiceChannel only. Most of
21 // nsILoadInfo functions are not implemented since TRRLoadInfo needs to
22 // support off main thread.
23 class TRRLoadInfo final : public nsILoadInfo {
24 public:
25 NS_DECL_THREADSAFE_ISUPPORTS
26 NS_DECL_NSILOADINFO
28 TRRLoadInfo(nsIURI* aResultPrincipalURI,
29 nsContentPolicyType aContentPolicyType);
31 already_AddRefed<nsILoadInfo> Clone() const;
33 private:
34 virtual ~TRRLoadInfo() = default;
36 nsCOMPtr<nsIURI> mResultPrincipalURI;
37 nsContentPolicyType mInternalContentPolicyType;
38 OriginAttributes mOriginAttributes;
39 nsTArray<nsCOMPtr<nsIRedirectHistoryEntry>> mEmptyRedirectChain;
40 nsTArray<nsCOMPtr<nsIPrincipal>> mEmptyPrincipals;
41 nsTArray<uint64_t> mEmptyBrowsingContextIDs;
42 nsTArray<nsCString> mCorsUnsafeHeaders;
43 nsID mSandboxedNullPrincipalID;
44 Maybe<mozilla::dom::ClientInfo> mClientInfo;
45 Maybe<mozilla::dom::ClientInfo> mReservedClientInfo;
46 Maybe<mozilla::dom::ClientInfo> mInitialClientInfo;
47 Maybe<mozilla::dom::ServiceWorkerDescriptor> mController;
48 Maybe<RFPTarget> mOverriddenFingerprintingSettings;
51 } // namespace net
52 } // namespace mozilla
54 #endif // mozilla_TRRLoadInfo_h