36 Components.utils.import(
"resource://app/jsmodules/ObserverUtils.jsm");
37 Components.utils.import(
"resource://app/jsmodules/StringUtils.jsm");
38 Components.utils.import(
"resource://gre/modules/XPCOMUtils.jsm");
40 const Ci = Components.interfaces;
41 const Cc = Components.classes;
42 const Cr = Components.results;
43 const Cu = Components.utils;
45 const CONTRACTID =
"@songbirdnest.com/songbird/feathersmanager;1";
46 const CLASSNAME =
"Songbird Feathers Manager Service Interface";
47 const CID = Components.ID(
"{99f24350-a67f-11db-befa-0800200c9a66}");
48 const IID =
Ci.sbIFeathersManager;
58 const DATAREMOTE_TESTMODE =
"__testmode__";
98 Cu.import(
"resource://app/jsmodules/RDFHelper.jsm");
99 Cu.import(
"resource://app/jsmodules/SBDataRemoteUtils.jsm");
100 Cu.import(
"resource://app/jsmodules/ArrayConverter.jsm");
101 Cu.import(
"resource://app/jsmodules/PlatformUtils.jsm");
109 requiredProperties: [
"internalName" ],
110 optionalProperties: [
"name" ],
112 if (!iid.equals(
Ci.sbISkinDescription))
113 throw Components.results.NS_ERROR_NO_INTERFACE;
124 requiredProperties: [
"name",
"url" ],
125 optionalProperties: [ ],
127 if (!iid.equals(
Ci.sbILayoutDescription))
128 throw Components.results.NS_ERROR_NO_INTERFACE;
146 for (var
i = 0;
i < this.
prototype.requiredProperties.length;
i++) {
147 var
property = this.
prototype.requiredProperties[
i];
148 if (! (typeof(description[property]) ==
'string'
149 && description[property].length > 0))
151 throw(
"Invalid description. '" + property +
"' is a required property.");
162 function AddonMetadataReader() {};
164 AddonMetadataReader.prototype = {
170 loadMetadata:
function(manager) {
172 this._manager = manager;
175 "rdf:addon-metadata",
176 "urn:songbird:addon:root",
180 for (var
i = 0;
i < addons.length;
i++) {
184 var feathersHub = addons[
i];
185 if (feathersHub.feathers) {
186 Components.utils.reportError(
"Feathers Metadata Reader: The <feathers/> element in " +
187 "install.rdf is deprecated and will go away in a future version.");
188 feathersHub = feathersHub.feathers[0];
191 if (feathersHub.skin) {
192 var
skins = feathersHub.skin;
193 for (var j = 0; j < skins.length; j++) {
195 this._registerSkin(addons[
i], skins[j]);
198 this._reportErrors(
"", [
"An error occurred while processing " +
199 "extension " + addons[
i].Value +
". Exception: " + e ]);
204 if (feathersHub.layout) {
205 var
layouts = feathersHub.layout;
206 for (var j = 0; j < layouts.length; j++) {
208 this._registerLayout(addons[
i], layouts[j]);
211 this._reportErrors(
"", [
"An error occurred while processing " +
212 "extension " + addons[
i].Value +
". Exception: " + e ]);
223 _registerSkin:
function _registerSkin(addon, skin) {
233 description[prop] = skin[prop][0];
236 errorList.push(
"Missing required <"+prop+
"> element.");
241 if(skin[prop] && skin[prop][0]) {
242 description[prop] = skin[prop][0];
248 if (errorList.length > 0) {
250 "Ignoring skin addon in the install.rdf of extension " +
251 addon.Value +
". Message: ", errorList);
259 var consoleSvc =
Cc[
"@mozilla.org/consoleservice;1"]
260 .getService(
Ci.nsIConsoleService);
261 consoleSvc.logStringMessage(
262 "Feathers Metadata Reader: Skipping registration of Feather with " +
263 "skin internal name: '" + skin[
"internalName"] +
"' due to " +
264 "undefined or blank skin name.");
269 this._manager.registerSkin(description);
273 if (skin.compatibleLayout) {
274 var compatibleLayouts = skin.compatibleLayout;
275 var hasRegisteredDefault =
false;
276 for (var
i = 0;
i < compatibleLayouts.length;
i++) {
277 var compatibleLayout = compatibleLayouts[
i];
281 if(compatibleLayout.layoutURL && compatibleLayout.layoutURL[0].length != 0) {
282 layoutUrl = compatibleLayout.layoutURL[0];
285 errorList.push(
"layoutUrl was missing or incorrect.");
289 var showChrome = (PlatformUtils.platformString ==
"Darwin");
290 if (compatibleLayout.showChrome &&
291 compatibleLayout.showChrome[0] ==
"true") {
295 if (compatibleLayout.onTop &&
296 compatibleLayout.onTop[0] ==
"true") {
300 this._manager.assertCompatibility(
302 description.internalName,
310 (compatibleLayout.isDefault &&
311 compatibleLayout.isDefault[0] ==
"true"))
313 this._manager.setDefaultLayout(layoutUrl, description.internalName);
315 if (hasRegisteredDefault) {
316 Components.utils.reportError(
317 "A default layout has already been assigned for " +
318 description.internalName
322 hasRegisteredDefault =
true;
326 if (errorList.length > 0) {
328 "Ignoring a <compatibleLayout> in the install.rdf of extension " +
329 addon.Value +
". Message: ", errorList);
338 _registerLayout:
function _processLayout(addon, layout) {
347 if(layout[prop][0]) {
348 description[prop] = layout[prop][0];
351 errorList.push(
"Missing required <"+prop+
"> element.");
356 if(layout[prop][0]) {
357 description[prop] = layout[prop][0];
363 if (errorList.length > 0) {
365 "Ignoring layout addon in the install.rdf of extension " +
366 addon.Value +
". Message: ", errorList);
374 var split = description.name.split(
"#", 2);
375 if (split.length == 2) {
377 name = bundle.get(split[1], name);
379 description.name =
name;
382 this._manager.registerLayout(description);
387 if (layout.compatibleSkin) {
388 var compatibleSkins = layout.compatibleSkin;
389 for (var
i = 0;
i < compatibleSkins.length;
i++) {
390 var compatibleSkin = compatibleSkins[
i];
393 if (compatibleSkin.internalName &&
394 compatibleSkin.internalName[0].length != 0)
396 internalName = compatibleSkin.internalName[0];
399 errorList.push(
"internalName was missing or incorrect.");
403 var showChrome =
false;
404 if (compatibleSkin.showChrome &&
405 compatibleSkin.showChrome[0] ==
"true") {
409 if (compatibleSkin.onTop &&
410 compatibleSkin.onTop[0] ==
"true") {
414 this._manager.assertCompatibility(
424 if (errorList.length > 0) {
426 "Error finding compatibility information for layout " +
427 description.name +
" in the install.rdf " +
428 "of extension " + addon.Value +
". Message: ", errorList);
438 _reportErrors:
function _reportErrors(contextMessage, errorList) {
439 for (var
i = 0;
i < errorList.length;
i++) {
440 Components.utils.reportError(
"Feathers Metadata Reader: "
441 + contextMessage + errorList[
i]);
465 function FeathersManager() {
467 this._observerSet =
new ObserverSet();
471 this._observerSet.add(
this,
"final-ui-startup",
false,
true);
474 this._observerSet.add(
this,
"quit-application",
false,
true);
478 this._skinDefaults = {};
480 this._listeners = [];
482 FeathersManager.prototype = {
488 category:
"app-startup",
489 entry:
"feathers-manager",
496 _layoutDataRemote:
null,
497 _skinDataRemote:
null,
499 _previousLayoutDataRemote:
null,
500 _previousSkinDataRemote:
null,
502 _showChromeDataRemote:
null,
507 _ignoreAutoswitch:
false,
510 _defaultLayoutURL:
"",
511 _defaultSecondaryLayoutURL:
"",
512 _defaultSkinName:
"",
548 _agentSheetURI:
null,
560 _init:
function init() {
563 Cc[
"@mozilla.org/browser/browserglue;1"]
564 .getService(
Ci.nsIObserver)
565 .observe(
null,
"prefservice:after-app-defaults",
null);
567 var AppPrefs =
Cc[
"@mozilla.org/fuel/application;1"]
568 .getService(
Ci.fuelIApplication).prefs;
574 this._ensureAddOnEnabled(defaultFeather);
578 this._defaultSecondaryLayoutURL =
585 this._ignoreAutoswitch =
true;
593 this._agentSheetURI =
Cc[
"@mozilla.org/network/io-service;1"]
594 .getService(
Ci.nsIIOService)
595 .newURI(
"chrome://songbird/skin/formsImport.css",
597 var styleSheetService =
Cc[
"@mozilla.org/content/style-sheet-service;1"]
598 .getService(
Ci.nsIStyleSheetService);
599 styleSheetService.loadAndRegisterSheet(this._agentSheetURI,
600 styleSheetService.AGENT_SHEET);
604 "@songbirdnest.com/Songbird/DataRemote;1",
605 Ci.sbIDataRemote,
"init");
616 if (!this.currentSkinName) {
617 this._skinDataRemote.stringValue = this._defaultSkinName;
623 var metadataReader =
new AddonMetadataReader();
624 metadataReader.loadMetadata(
this);
627 if (this._layoutDataRemote.stringValue ==
"") {
628 this._layoutDataRemote.stringValue = this._defaultLayoutURL;
632 var showChrome = this.isChromeEnabled(this.currentLayoutURL,
633 this.currentSkinName);
634 this._setChromeEnabled(showChrome);
640 _deinit:
function deinit() {
641 this._observerSet.removeAll();
642 this._observerSet =
null;
644 this._layouts =
null;
645 this._mappings =
null;
646 this._listeners =
null;
647 this._layoutDataRemote =
null;
648 this._skinDataRemote =
null;
649 this._previousLayoutDataRemote =
null;
650 this._previousSkinDataRemote =
null;
651 this._showChromeDataRemote =
null;
657 get currentSkinName() {
658 return this._skinDataRemote.stringValue;
665 get currentLayoutURL() {
666 return this._layoutDataRemote.stringValue;
673 get previousSkinName() {
675 var skin = this.getSkinDescription(this._previousSkinDataRemote.stringValue);
679 return skin.internalName;
683 return this._defaultSkinName;
690 get previousLayoutURL() {
692 var layout = this.getLayoutDescription(this._previousLayoutDataRemote.stringValue);
704 var layoutURL = this._defaultLayoutURL;
705 if (this.currentLayoutURL == layoutURL) {
706 layoutURL = this._defaultSecondaryLayoutURL;
717 return this._skinCount;
724 return this._layoutCount;
731 getSkinDescriptions:
function getSkinDescriptions() {
733 return ArrayConverter.enumerator( [this._skins[
key]
for (
key in this._skins)] );
739 getLayoutDescriptions:
function getLayoutDescriptions() {
741 return ArrayConverter.enumerator( [this._layouts[
key]
for (
key in this._layouts)] );
748 registerSkin:
function registerSkin(skinDesc) {
752 if (this._skins[skinDesc.internalName] ==
null) {
755 this._skins[skinDesc.internalName] = skinDesc;
764 unregisterSkin:
function unregisterSkin(skinDesc) {
765 if (this._skins[skinDesc.internalName]) {
766 delete this._skins[skinDesc.internalName];
777 getSkinDescription:
function getSkinDescription(internalName) {
778 return this._skins[internalName];
785 registerLayout:
function registerLayout(layoutDesc) {
788 if (!(layoutDesc.url in
this._layouts)) {
791 this._layouts[layoutDesc.url] = layoutDesc;
800 unregisterLayout:
function unregisterLayout(layoutDesc) {
801 if (layoutDesc.url in
this._layouts) {
802 delete this._layouts[layoutDesc.url];
813 getLayoutDescription:
function getLayoutDescription(
url) {
814 return (
url in this._layouts ? this._layouts[
url] :
null);
822 function assertCompatibility(layoutURL, internalName, aShowChrome, aOnTop) {
823 if (! (typeof(layoutURL) ==
"string" && typeof(internalName) ==
'string')) {
824 throw Components.results.NS_ERROR_INVALID_ARG;
826 if (this._mappings[layoutURL] ==
null) {
827 this._mappings[layoutURL] = {};
829 this._mappings[layoutURL][internalName] = {showChrome: aShowChrome, onTop: aOnTop};
834 var branch = this.getFeatherPrefBranch(layoutURL, internalName);
837 seen = branch.getBoolPref(
"seen");
840 branch.setBoolPref(
"seen",
true);
841 if (!this._autoswitch && !this._ignoreAutoswitch) {
842 this._autoswitch = {};
843 this._autoswitch.skin = internalName;
844 this._autoswitch.layoutURL = layoutURL;
855 unassertCompatibility:
function unassertCompatibility(layoutURL, internalName) {
856 if (this._mappings[layoutURL]) {
857 delete this._mappings[layoutURL][internalName];
867 setDefaultLayout:
function setDefaultLayout(aLayoutURL, aInternalName) {
868 if (!(typeof(aLayoutURL) ==
"string" &&
869 typeof(aInternalName) ==
"string"))
871 throw Components.results.NS_ERROR_INVALID_ARG;
874 this._skinDefaults[aInternalName] = aLayoutURL;
881 getDefaultLayout:
function getDefaultLayout(aInternalName) {
882 if (!typeof(aInternalName) ==
"string") {
883 throw Components.results.NS_ERROR_INVALID_ARG;
886 var defaultLayoutURL = this._skinDefaults[aInternalName];
890 if (!defaultLayoutURL) {
891 for (var curLayoutURL in this._mappings) {
892 if (aInternalName in this._mappings[curLayoutURL]) {
893 defaultLayoutURL = curLayoutURL;
900 if (!defaultLayoutURL) {
901 throw Components.results.NS_ERROR_FAILURE;
904 return defaultLayoutURL;
910 isChromeEnabled:
function isChromeEnabled(layoutURL, internalName) {
913 var sysInfo =
Cc[
"@mozilla.org/system-info;1"]
914 .getService(
Ci.nsIPropertyBag2);
915 var platform = sysInfo.getProperty(
"name");
917 if (this._mappings[layoutURL]) {
918 if (this._mappings[layoutURL][internalName]) {
919 return this._mappings[layoutURL][internalName].showChrome ==
true;
927 getFeatherPrefBranch:
function getFeatherPrefBranch (layoutURL, internalName) {
928 var
prefs =
Cc[
"@mozilla.org/preferences-service;1"]
929 .getService(
Ci.nsIPrefService);
934 function escape_url(
url) {
935 return url.replace(/[^a-zA-Z0-9]/g,
937 return '_'+(c.charCodeAt(0).toString(16)).toUpperCase()+
'_'; });
940 var branchName =
'songbird.feather.' +
941 (internalName?internalName:
'null') +
'.' +
942 (layoutURL?escape_url(layoutURL):
'null') +
'.';
944 return prefs.getBranch(branchName);
948 canOnTop:
function canOnTop(layoutURL, internalName) {
949 if (this._mappings[layoutURL]) {
950 if (this._mappings[layoutURL][internalName]) {
951 return this._mappings[layoutURL][internalName].onTop ==
true;
959 isOnTop:
function isOnTop(layoutURL, internalName) {
960 if (!this.canOnTop(layoutURL, internalName)) {
964 var prefBranch = this.getFeatherPrefBranch(layoutURL,
null);
965 if (prefBranch.prefHasUserValue(
'on_top')) {
966 return prefBranch.getBoolPref(
'on_top');
973 setOnTop:
function setOnTop(layoutURL, internalName, onTop) {
974 if (!this.canOnTop(layoutURL, internalName)) {
978 var prefBranch = this.getFeatherPrefBranch(layoutURL,
null);
979 prefBranch.setBoolPref(
'on_top', onTop);
991 getSkinsForLayout:
function getSkinsForLayout(layoutURL) {
995 if (this._mappings[layoutURL]) {
996 for (internalName in this._mappings[layoutURL]) {
997 var desc = this.getSkinDescription(internalName);
1003 return ArrayConverter.enumerator( skins );
1010 getLayoutsForSkin:
function getLayoutsForSkin(internalName) {
1011 return ArrayConverter.enumerator( this._getLayoutsArrayForSkin(internalName) );
1018 switchFeathers:
function switchFeathers(layoutURL, internalName) {
1020 if (this._switching) {
1024 layoutDescription = this.getLayoutDescription(layoutURL);
1025 skinDescription = this.getSkinDescription(internalName);
1028 if (layoutDescription ==
null || skinDescription ==
null) {
1029 throw new Components.Exception(
"Unknown layout/skin passed to switchFeathers");
1035 if (this._mappings[layoutURL][internalName] === undefined) {
1036 throw new Components.Exception(
"Skin [" + internalName +
"] and Layout [" + layoutURL +
1037 " are not compatible");
1041 this._onSelect(layoutDescription, skinDescription);
1044 this._previousLayoutDataRemote.stringValue = this.currentLayoutURL;
1045 this._previousSkinDataRemote.stringValue = this.currentSkinName;
1048 var appStartup =
Cc[
"@mozilla.org/toolkit/app-startup;1"]
1049 .getService(
Ci.nsIAppStartup);
1050 appStartup.enterLastWindowClosingSurvivalArea();
1056 this._closePlayerWindow(internalName == this.currentSkinName);
1058 var timer =
Cc[
"@mozilla.org/timer;1"].createInstance(
Ci.nsITimer);
1060 this._switching =
true;
1061 timer.initWithCallback(callback, 0,
Ci.nsITimer.TYPE_ONE_SHOT);
1064 appStartup.exitLastWindowClosingSurvivalArea();
1072 switchToNextLayout:
function switchToNextLayout() {
1073 var curSkinName = this.currentSkinName;
1074 var curLayoutURL = this.currentLayoutURL;
1078 var
layouts = this._getLayoutsArrayForSkin(curSkinName);
1079 for (var
i = 0;
i < layouts.length;
i++) {
1080 if (layouts[
i].
url == curLayoutURL) {
1081 if (
i >= layouts.length - 1) {
1082 nextLayout = layouts[0];
1085 nextLayout = layouts[
i+1];
1090 if (nextLayout !=
null && nextLayout.url != curLayoutURL) {
1091 this.switchFeathers(nextLayout.url, curSkinName);
1100 openPlayerWindow:
function openPlayerWindow() {
1103 if (this._autoswitch && !this._switching) {
1104 this._layoutDataRemote.stringValue = this._autoswitch.layoutURL;
1105 this._skinDataRemote.stringValue = this._autoswitch.skin;
1106 this._autoswitch =
null;
1110 var layoutDescription = this.getLayoutDescription(this.currentLayoutURL);
1111 var skinDescription = this.getSkinDescription(this.currentSkinName);
1112 if (layoutDescription ==
null || skinDescription ==
null) {
1114 this.switchFeathers(this._defaultLayoutURL, this._defaultSkinName);
1118 var currentLayoutURL = this.currentLayoutURL;
1119 var currentSkinName = this.currentSkinName;
1122 var app =
Cc[
"@mozilla.org/xre/app-info;1"]
1123 .getService(
Ci.nsIXULRuntime);
1124 if (app.inSafeMode) {
1127 currentLayoutURL = this._defaultLayoutURL;
1128 currentSkinName = this._defaultSkinName;
1136 dump(
"FeathersManager.openPlayerWindow: In Test Mode, no window will be open!\n");
1137 Cu.reportError(
"FeathersManager.openPlayerWindow: In Test Mode, no window will be open\n");
1143 var chromeFeatures =
"chrome,modal=no,resizable=yes,toolbar=yes,popup=no";
1147 var runtimeInfo = Components.classes[
"@mozilla.org/xre/runtime;1"]
1148 .getService(Components.interfaces.nsIXULRuntime);
1149 switch (runtimeInfo.OS) {
1152 chromeFeatures +=
",centerscreen";
1155 var showChrome = this.isChromeEnabled(currentLayoutURL, currentSkinName);
1157 chromeFeatures +=
",titlebar=yes";
1159 chromeFeatures +=
",titlebar=no";
1163 this._setChromeEnabled(showChrome);
1166 var windowWatcher =
Cc[
"@mozilla.org/embedcomp/window-watcher;1"]
1167 .getService(
Ci.nsIWindowWatcher);
1169 var newMainWin = windowWatcher.openWindow(
null,
1182 if (! (
listener instanceof
Ci.sbIFeathersManagerListener))
1184 throw Components.results.NS_ERROR_INVALID_ARG;
1192 removeListener:
function removeListener(
listener) {
1193 var index = this._listeners.indexOf(
listener);
1195 this._listeners.splice(index,1);
1203 _getLayoutsArrayForSkin:
function _getLayoutsArrayForSkin(internalName) {
1207 for (var layout in this._mappings) {
1208 if (internalName in this._mappings[layout]) {
1209 var desc = this.getLayoutDescription(layout);
1227 _closePlayerWindow:
function _closePlayerWindow(aLayoutSwitchOnly) {
1233 dump(
"FeathersManager.openPlayerWindow: In Test Mode\n");
1234 Cu.reportError(
"FeathersManager.openPlayerWindow: In Test Mode\n");
1238 var windowMediator =
Cc[
"@mozilla.org/appshell/window-mediator;1"]
1239 .getService(
Ci.nsIWindowMediator);
1243 var playerWindows = windowMediator.getEnumerator(
null);
1244 while (playerWindows.hasMoreElements()) {
1245 var
window = playerWindows.getNext();
1252 let docElement = window.document.documentElement;
1255 switch (docElement.getAttribute(
"id")) {
1256 case "JSConsoleWindow":
1257 case "winInspectorMain":
1258 case "venkman-window":
1262 if (aLayoutSwitchOnly) {
1265 if (docElement.hasAttribute(
"sb-no-close-on-layout-switch")) {
1283 _setChromeEnabled:
function _setChromeEnabled(enabled) {
1286 this._showChromeDataRemote.boolValue = enabled;
1288 var prefs =
Cc[
"@mozilla.org/preferences-service;1"]
1289 .getService(
Ci.nsIPrefBranch);
1295 var titlebarRegEx = /(
titlebar=)(no|yes)/;
1296 var replacement = (enabled) ?
"$1yes" :
"$1no";
1297 var defaultChromeFeatures = prefs.getCharPref(
"toolkit.defaultChromeFeatures");
1298 prefs.setCharPref(
"toolkit.defaultChromeFeatures",
1299 defaultChromeFeatures.replace(titlebarRegEx, replacement));
1301 Cu.reportError(
"FeathersManager._setChromeEnabled: Error setting " +
1302 "defaultChromeFeatures pref!\n" + e);
1310 _onUpdate:
function onUpdate() {
1311 this._listeners.forEach(
function (
listener) {
1320 _onSelect:
function onSelect(layoutDesc, skinDesc) {
1322 layoutDesc = layoutDesc.QueryInterface(
Ci.sbILayoutDescription);
1323 skinDesc = skinDesc.QueryInterface(
Ci.sbISkinDescription);
1326 this._listeners.forEach(
function (
listener) {
1327 listener.onFeathersSelectRequest(layoutDesc, skinDesc);
1331 _onSelectComplete:
function onSelectComplete() {
1332 var layoutDescription = this.getLayoutDescription(this.currentLayoutURL);
1333 var skinDescription = this.getSkinDescription(this.currentSkinName);
1336 this._listeners.forEach(
function (
listener) {
1337 listener.onFeathersSelectComplete(layoutDescription, skinDescription);
1345 var
os =
Cc[
"@mozilla.org/observer-service;1"]
1346 .getService(
Ci.nsIObserverService);
1348 case "quit-application":
1352 case "final-ui-startup":
1364 _ensureAddOnEnabled:
function(
id) {
1365 const nsIUpdateItem =
Ci.nsIUpdateItem;
1366 var em =
Cc[
"@mozilla.org/extensions/manager;1"]
1367 .getService(
Ci.nsIExtensionManager);
1368 var ds = em.datasource;
1369 var rdf =
Cc[
"@mozilla.org/rdf/rdf-service;1"]
1370 .getService(
Ci.nsIRDFService);
1372 var resource = rdf.GetResource(
"urn:mozilla:item:" +
id);
1374 var
property = rdf.GetResource(
"http://www.mozilla.org/2004/em-rdf#userDisabled");
1375 var
target = ds.GetTarget(resource, property,
true);
1377 function getData(literalOrResource) {
1378 if (literalOrResource instanceof
Ci.nsIRDFLiteral ||
1379 literalOrResource instanceof
Ci.nsIRDFResource ||
1380 literalOrResource instanceof
Ci.nsIRDFInt)
1381 return literalOrResource.Value;
1385 var userDisabled = getData(target);
1387 if (userDisabled ==
"true") {
1396 XPCOMUtils.generateQI([
IID, Components.interfaces.nsIObserver]),
1407 this.layoutURL = aLayoutURL;
1408 this.internalName = aInternalName;
1415 notify:
function FeathersManager_switchFeathers_callback_notify() {
1422 Cc[
"@mozilla.org/observer-service;1"]
1423 .getService(
Ci.nsIObserverService)
1424 .notifyObservers(
null,
"chrome-flush-caches",
null);
1427 var styleSheetService =
Cc[
"@mozilla.org/content/style-sheet-service;1"]
1428 .getService(
Ci.nsIStyleSheetService);
1429 styleSheetService.unregisterSheet(this.
feathersManager._agentSheetURI,
1430 styleSheetService.AGENT_SHEET);
1431 styleSheetService.loadAndRegisterSheet(this.
feathersManager._agentSheetURI,
1432 styleSheetService.AGENT_SHEET);
1440 var appStartup =
Cc[
"@mozilla.org/toolkit/app-startup;1"]
1441 .getService(
Ci.nsIAppStartup);
1442 appStartup.exitLastWindowClosingSurvivalArea();
1458 return XPCOMUtils.generateModule([FeathersManager]);
SkinDescription prototype
const WINDOWTYPE_SONGBIRD_CORE
function FeathersManager_switchFeathers_callback(aFeathersManager, aLayoutURL, aInternalName)
sbDeviceFirmwareAutoCheckForUpdate prototype contractID
sbOSDControlService prototype QueryInterface
sbDeviceFirmwareAutoCheckForUpdate prototype classDescription
const PREF_DEFAULT_FEATHER_ID
function NSGetModule(comMgr, fileSpec)
const PREF_DEFAULT_SKIN_INTERNALNAME
function LayoutDescription()
const PREF_DEFAULT_SECONDARY_LAYOUT
function SBString(aKey, aDefault, aStringBundle)
const PREF_FEATHERS_MANAGER_HAS_STARTED
function RDFHelper(aRdf, aDatasource, aResource, aNamespaces)
TimerLoop prototype notify
function SBDataGetBoolValue(aKey)
Get the value of the data in boolean format.
const WINDOWTYPE_SONGBIRD_PLAYER
DataRemote prototype constructor
function SBStringBundle(aBundle)
const PREF_DEFAULT_MAIN_LAYOUT
sbDeviceFirmwareAutoCheckForUpdate prototype classID
sbWindowsAutoPlayServiceCfg _xpcom_categories
_dialogDatepicker onSelect
_getSelectedPageStyle s i
function SkinDescription()
sbDeviceFirmwareAutoCheckForUpdate prototype observe