chrome/public/nsIChromeRegistry.idl

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
michael@0 2 *
michael@0 3 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7 #include "nsISupports.idl"
michael@0 8
michael@0 9 interface nsIURI;
michael@0 10
michael@0 11 [scriptable, uuid(249fb5ad-ae29-4e2c-a728-ba5cf464d188)]
michael@0 12 interface nsIChromeRegistry : nsISupports
michael@0 13 {
michael@0 14 const int32_t NONE = 0;
michael@0 15 const int32_t PARTIAL = 1;
michael@0 16 const int32_t FULL = 2;
michael@0 17
michael@0 18 /**
michael@0 19 * Resolve a chrome URL to an loadable URI using the information in the
michael@0 20 * registry. Does not modify aChromeURL.
michael@0 21 *
michael@0 22 * Chrome URLs are allowed to be specified in "shorthand", leaving the
michael@0 23 * "file" portion off. In that case, the URL is expanded to:
michael@0 24 *
michael@0 25 * chrome://package/provider/package.ext
michael@0 26 *
michael@0 27 * where "ext" is:
michael@0 28 *
michael@0 29 * "xul" for a "content" package,
michael@0 30 * "css" for a "skin" package, and
michael@0 31 * "dtd" for a "locale" package.
michael@0 32 *
michael@0 33 * @param aChromeURL the URL that is to be converted.
michael@0 34 */
michael@0 35 nsIURI convertChromeURL(in nsIURI aChromeURL);
michael@0 36
michael@0 37 /**
michael@0 38 * refresh the chrome list at runtime, looking for new packages/etc
michael@0 39 */
michael@0 40 void checkForNewChrome();
michael@0 41
michael@0 42 /**
michael@0 43 * returns whether XPCNativeWrappers are enabled for aURI.
michael@0 44 */
michael@0 45 [notxpcom] boolean wrappersEnabled(in nsIURI aURI);
michael@0 46 };
michael@0 47
michael@0 48 [scriptable, uuid(c2461347-2b8f-48c7-9d59-3a61fb868828)]
michael@0 49 interface nsIXULChromeRegistry : nsIChromeRegistry
michael@0 50 {
michael@0 51 /* Should be called when locales change to reload all chrome (including XUL). */
michael@0 52 void reloadChrome();
michael@0 53
michael@0 54 ACString getSelectedLocale(in ACString packageName);
michael@0 55
michael@0 56 // Get the direction of the locale via the intl.uidirection.<locale> pref
michael@0 57 boolean isLocaleRTL(in ACString package);
michael@0 58
michael@0 59 /* Should be called when skins change. Reloads only stylesheets. */
michael@0 60 void refreshSkins();
michael@0 61
michael@0 62 /**
michael@0 63 * Installable skin XBL is not always granted the same privileges as other
michael@0 64 * chrome. This asks the chrome registry whether scripts are allowed to be
michael@0 65 * run for a particular chrome URI. Do not pass non-chrome URIs to this
michael@0 66 * method.
michael@0 67 */
michael@0 68 boolean allowScriptsForPackage(in nsIURI url);
michael@0 69
michael@0 70 /**
michael@0 71 * Content should only be allowed to load chrome JS from certain packages.
michael@0 72 * This method reflects the contentaccessible flag on packages.
michael@0 73 * Do not pass non-chrome URIs to this method.
michael@0 74 */
michael@0 75 boolean allowContentToAccess(in nsIURI url);
michael@0 76 };
michael@0 77
michael@0 78 %{ C++
michael@0 79
michael@0 80 #define NS_CHROMEREGISTRY_CONTRACTID \
michael@0 81 "@mozilla.org/chrome/chrome-registry;1"
michael@0 82
michael@0 83 /**
michael@0 84 * Chrome registry will notify various caches that all chrome files need
michael@0 85 * flushing.
michael@0 86 */
michael@0 87 #define NS_CHROME_FLUSH_TOPIC \
michael@0 88 "chrome-flush-caches"
michael@0 89
michael@0 90 /**
michael@0 91 * Chrome registry will notify various caches that skin files need flushing.
michael@0 92 * If "chrome-flush-caches" is notified, this topic will *not* be notified.
michael@0 93 */
michael@0 94 #define NS_CHROME_FLUSH_SKINS_TOPIC \
michael@0 95 "chrome-flush-skin-caches"
michael@0 96
michael@0 97 %}

mercurial