Bug 1807268 - Re-enable verifyShowClipboardSuggestionsToggleTest UI test r=jajohnson
[gecko.git] / netwerk / cookie / nsICookieJarSettings.idl
blobd522c9635839ee1dc642d3c72079720b6d78a7d0
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 "nsISerializable.idl"
10 interface nsIPrincipal;
11 interface nsIURI;
13 /**
14 * Cookie jar settings for top-level documents. Please see CookieJarSettings.h
15 * for more details.
17 [scriptable, builtinclass, uuid(3ec40331-7cf0-4b71-ba2a-2265aab8f6bc)]
18 interface nsICookieJarSettings : nsISerializable
20 /**
21 * CookieBehavior at the loading of the document. Any other loadInfo
22 * inherits it from its document's loadInfo. If there is not a document
23 * involved, cookieBehavior is reject.
25 [infallible] readonly attribute unsigned long cookieBehavior;
27 /**
28 * First-Party Isolation state at the loading of the document.
30 [infallible] readonly attribute boolean isFirstPartyIsolated;
32 /**
33 * Resist Fingerprinting state at the loading of the document.
35 [infallible] readonly attribute boolean shouldResistFingerprinting;
37 /**
38 * Whether our cookie behavior mandates rejecting third-party contexts.
40 [infallible] readonly attribute boolean rejectThirdPartyContexts;
42 [infallible] readonly attribute boolean limitForeignContexts;
44 [infallible] readonly attribute boolean blockingAllThirdPartyContexts;
46 [infallible] readonly attribute boolean blockingAllContexts;
47 /**
48 * Whether our cookie behavior mandates partitioning third-party content.
50 [infallible] attribute boolean partitionForeign;
52 /**
53 * Whether the top-level document is on the content blocking allow list.
55 [infallible] readonly attribute boolean isOnContentBlockingAllowList;
57 /**
58 * The key used for partitioning.
60 readonly attribute AString partitionKey;
62 /**
63 * The key used for fingerprinting randomization.
65 readonly attribute Array<uint8_t> fingerprintingRandomizationKey;
67 /**
68 * CookiePermission at the loading of the document for a particular
69 * principal. It returns the same cookiePermission also in case it changes
70 * during the life-time of the top document.
72 unsigned long cookiePermission(in nsIPrincipal aPrincipal);
74 /**
75 * Initiate the cookieJarSettings with a URI. The aURI will be used to build
76 * the partition key for this cookieJarSettings. This function is added for
77 * js code to be able to set the partitionKey from a first-party URI.
79 * The aIsPrivate indicates if this cookieJarSettings is initiated for the
80 * private browsing mode or not. If aIsPrivate was true, it will get
81 * cookieBehavior from the pref "network.cookie.cookieBehavior" which is for
82 * the regular browsing mode. Otherwise, it will get from the pref
83 * "network.cookie.cookieBehavior.pbmode" for the private browsing mode.
85 void initWithURI(in nsIURI aURI, in boolean aIsPrivate);