use better ifdef for xremote.

This commit is contained in:
blakeross%telocity.com 2002-10-13 21:25:16 +00:00
parent c3555b0d30
commit 696b7bb669

View File

@ -354,16 +354,14 @@ function Startup()
loadURI(uriToLoad);
}
}
#ifdef XP_UNIX
#ifdef MOZ_ENABLE_XREMOTE
// hook up remote support
if (XREMOTESERVICE_CONTRACTID in Components.classes) {
var remoteService;
remoteService = Components.classes[XREMOTESERVICE_CONTRACTID]
.getService(Components.interfaces.nsIXRemoteService);
remoteService.addBrowserInstance(window);
var remoteService;
remoteService = Components.classes[XREMOTESERVICE_CONTRACTID]
.getService(Components.interfaces.nsIXRemoteService);
remoteService.addBrowserInstance(window);
RegisterTabOpenObserver();
}
RegisterTabOpenObserver();
}
#endif
if (window.opener) {
@ -453,14 +451,12 @@ function WindowFocusTimerCallback(element)
function Shutdown()
{
#ifdef XP_UNIX
#ifdef MOZ_ENABLE_XREMOTE
// remove remote support
if (XREMOTESERVICE_CONTRACTID in Components.classes) {
var remoteService;
remoteService = Components.classes[XREMOTESERVICE_CONTRACTID]
.getService(Components.interfaces.nsIXRemoteService);
remoteService.removeBrowserInstance(window);
}
var remoteService;
remoteService = Components.classes[XREMOTESERVICE_CONTRACTID]
.getService(Components.interfaces.nsIXRemoteService);
remoteService.removeBrowserInstance(window);
#endif
try {
gBrowser.removeProgressListener(window.XULBrowserWindow);