Bug 568276: Check for strange-variable-combination regression. (r=brendan)
[mozilla-central.git] / chrome / public / nsIChromeRegistry.idl
blob43362895ee920c124273fe197b05c427b17d71bc
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
16 * The Original Code is the Mozilla browser.
18 * The Initial Developer of the Original Code is
19 * Netscape Communications Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 1999
21 * the Initial Developer. All Rights Reserved.
23 * Contributor(s):
24 * pav
25 * Blake Ross (blaker@netscape.com)
26 * Benjamin Smedberg <bsmedberg@covad.net>
28 * Alternatively, the contents of this file may be used under the terms of
29 * either of the GNU General Public License Version 2 or later (the "GPL"),
30 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
31 * in which case the provisions of the GPL or the LGPL are applicable instead
32 * of those above. If you wish to allow use of your version of this file only
33 * under the terms of either the GPL or the LGPL, and not to allow others to
34 * use your version of this file under the terms of the MPL, indicate your
35 * decision by deleting the provisions above and replace them with the notice
36 * and other provisions required by the GPL or the LGPL. If you do not delete
37 * the provisions above, a recipient may use your version of this file under
38 * the terms of any one of the MPL, the GPL or the LGPL.
40 * ***** END LICENSE BLOCK ***** */
42 #include "nsISupports.idl"
44 interface nsIURI;
46 [scriptable, uuid(249fb5ad-ae29-4e2c-a728-ba5cf464d188)]
47 interface nsIChromeRegistry : nsISupports
49 const PRInt32 NONE = 0;
50 const PRInt32 PARTIAL = 1;
51 const PRInt32 FULL = 2;
53 /**
54 * Resolve a chrome URL to an loadable URI using the information in the
55 * registry. Does not modify aChromeURL.
57 * Chrome URLs are allowed to be specified in "shorthand", leaving the
58 * "file" portion off. In that case, the URL is expanded to:
60 * chrome://package/provider/package.ext
62 * where "ext" is:
64 * "xul" for a "content" package,
65 * "css" for a "skin" package, and
66 * "dtd" for a "locale" package.
68 * @param aChromeURL the URL that is to be converted.
70 nsIURI convertChromeURL(in nsIURI aChromeURL);
72 /**
73 * refresh the chrome list at runtime, looking for new packages/etc
75 void checkForNewChrome();
77 /**
78 * returns whether XPCNativeWrappers are enabled for aURI.
80 [notxpcom] boolean wrappersEnabled(in nsIURI aURI);
83 [scriptable, uuid(c2461347-2b8f-48c7-9d59-3a61fb868828)]
84 interface nsIXULChromeRegistry : nsIChromeRegistry
86 /* Should be called when locales change to reload all chrome (including XUL). */
87 void reloadChrome();
89 ACString getSelectedLocale(in ACString packageName);
91 // Get the direction of the locale via the intl.uidirection.<locale> pref
92 boolean isLocaleRTL(in ACString package);
94 /* Should be called when skins change. Reloads only stylesheets. */
95 void refreshSkins();
97 /**
98 * Installable skin XBL is not always granted the same privileges as other
99 * chrome. This asks the chrome registry whether scripts are allowed to be
100 * run for a particular chrome URI. Do not pass non-chrome URIs to this
101 * method.
103 boolean allowScriptsForPackage(in nsIURI url);
106 * Content should only be allowed to load chrome JS from certain packages.
107 * This method reflects the contentaccessible flag on packages.
108 * Do not pass non-chrome URIs to this method.
110 boolean allowContentToAccess(in nsIURI url);
113 %{ C++
115 #define NS_CHROMEREGISTRY_CONTRACTID \
116 "@mozilla.org/chrome/chrome-registry;1"
119 * Chrome registry will notify various caches that all chrome files need
120 * flushing.
122 #define NS_CHROME_FLUSH_TOPIC \
123 "chrome-flush-caches"
126 * Chrome registry will notify various caches that skin files need flushing.
127 * If "chrome-flush-caches" is notified, this topic will *not* be notified.
129 #define NS_CHROME_FLUSH_SKINS_TOPIC \
130 "chrome-flush-skin-caches"