aboutsummaryrefslogtreecommitdiff
path: root/chrome/code/xpcom.js
diff options
context:
space:
mode:
authorEinar Egilsson2011-08-29 15:40:18 +0200
committerEinar Egilsson2011-08-29 15:40:18 +0200
commit14c86c9676cd02a61c0a2d1254ea1843d7713473 (patch)
tree167e2442e93f1b832bc7a5a10b4aabd9e32985c3 /chrome/code/xpcom.js
parent3e0cb9136bf1a428680db8a886eb8731b9a0b863 (diff)
Very rough draft of html settings
Diffstat (limited to 'chrome/code/xpcom.js')
-rw-r--r--chrome/code/xpcom.js18
1 files changed, 13 insertions, 5 deletions
diff --git a/chrome/code/xpcom.js b/chrome/code/xpcom.js
index a983433..e81f58e 100644
--- a/chrome/code/xpcom.js
+++ b/chrome/code/xpcom.js
@@ -1,7 +1,4 @@
-var EXPORTED_SYMBOLS = [
-'Ci', 'Cc', 'Cr', 'ServerSocket', 'ScriptableInputStream', 'FileInputStream', 'ConverterInputStream', 'LocalFile'];
-
Ci = Components.interfaces;
Cc = Components.classes;
Cr = Components.results;
@@ -11,10 +8,21 @@ const ScriptableInputStream = Components.Constructor("@mozilla.org/scriptableinp
const FileInputStream = Components.Constructor("@mozilla.org/network/file-input-stream;1", "nsIFileInputStream", "init");
const ConverterInputStream = Components.Constructor("@mozilla.org/intl/converter-input-stream;1", "nsIConverterInputStream", "init");
const LocalFile = Components.Constructor("@mozilla.org/file/local;1", "nsILocalFile", "initWithPath");
-
-function Service(className, interfaceName)
+const FilePicker = Components.Constructor("@mozilla.org/filepicker;1", "nsIFilePicker", "init");
+const FilePickerMode = { save : Ci.nsIFilePicker.modeSave, open : Ci.nsIFilePicker.modeOpen };
+
+function Service(className, interfaceName) {
return Cc[className].getService(Ci[interfaceName]);
}
const PromptService = Service("@mozilla.org/embedcomp/prompt-service;1","nsIPromptService");
const IOService = Service("@mozilla.org/network/io-service;1","nsIIOService");
+const LocaleService = Service("@mozilla.org/intl/nslocaleservice;1", "nsILocaleService");
+const StringBundleService = Service("@mozilla.org/intl/stringbundle;1", "nsIStringBundleService");
+
+var EXPORTED_SYMBOLS = [];
+for (var name in this) {
+ if (name != 'Service' && name != 'QueryInterface' && name != 'name' && name != 'EXPORTED_SYMBOLS') {
+ EXPORTED_SYMBOLS.push(name);
+ }
+}