return win;
}
+ function getLocalizedStrings(path) {
+ var stringBundle = Cc['@mozilla.org/intl/stringbundle;1'].
+ getService(Ci.nsIStringBundleService).
+ createBundle('chrome://pdf.js/locale/' + path);
+
+ var map = {};
+ var enumerator = stringBundle.getSimpleEnumeration();
+ while (enumerator.hasMoreElements()) {
+ var string = enumerator.getNext().QueryInterface(Ci.nsIPropertyElement);
+ var key = string.key, property = 'textContent';
+ var i = key.lastIndexOf('.');
+ if (i >= 0) {
+ property = key.substring(i + 1);
+ key = key.substring(0, i);
+ }
+ if (!(key in map))
+ map[key] = {};
+ map[key][property] = string.value;
+ }
+ return map;
+ }
+
// All the priviledged actions.
function ChromeActions() {
- this.inPrivateBrowswing = privateBrowsing.privateBrowsingEnabled;
}
+
ChromeActions.prototype = {
download: function(data) {
let mimeService = Cc['@mozilla.org/mime;1'].getService(Ci.nsIMIMEService);