mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
More Linux-specific fixup from bug 568691
This commit is contained in:
parent
0b5ca686bf
commit
ca8c9d3053
@ -44,7 +44,7 @@ extern "C" {
|
||||
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsIPrefBranch2.h"
|
||||
@ -985,14 +985,22 @@ nsGnomeVFSProtocolHandler::Observe(nsISupports *aSubject,
|
||||
}
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGnomeVFSProtocolHandler, Init)
|
||||
NS_DEFINE_NAMED_CID(NS_GNOMEVFSPROTOCOLHANDLER_CID);
|
||||
|
||||
static const nsModuleComponentInfo components[] =
|
||||
{
|
||||
{ "nsGnomeVFSProtocolHandler",
|
||||
NS_GNOMEVFSPROTOCOLHANDLER_CID,
|
||||
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX MOZ_GNOMEVFS_SCHEME,
|
||||
nsGnomeVFSProtocolHandlerConstructor
|
||||
}
|
||||
static const mozilla::Module::CIDEntry kVFSCIDs[] = {
|
||||
{ &kNS_GNOMEVFSPROTOCOLHANDLER_CID, false, NULL, nsGnomeVFSProtocolHandlerConstructor },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE(nsGnomeVFSModule, components)
|
||||
static const mozilla::Module::ContractIDEntry kVFSContracts[] = {
|
||||
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX MOZ_GNOMEVFS_SCHEME, &kNS_GNOMEVFSPROTOCOLHANDLER_CID },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const mozilla::Module kVFSModule = {
|
||||
mozilla::Module::kVersion,
|
||||
kVFSCIDs,
|
||||
kVFSContracts
|
||||
};
|
||||
|
||||
NSMODULE_DEFN(nsGnomeVFSModule) = &kVFSModule;
|
||||
|
@ -40,67 +40,38 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsICategoryManager.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsSystemPref.h"
|
||||
#include "nsSystemPrefService.h"
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSystemPref, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSystemPrefService, Init)
|
||||
|
||||
// Registering nsSystemPref module as part of the app-startup category to get
|
||||
// it instantiated.
|
||||
NS_DEFINE_NAMED_CID(NS_SYSTEMPREF_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_SYSTEMPREF_SERVICE_CID);
|
||||
|
||||
static NS_METHOD
|
||||
RegisterSystemPref(nsIComponentManager *aCompMgr,
|
||||
nsIFile *aPath,
|
||||
const char *registryLocation,
|
||||
const char *componentType,
|
||||
const nsModuleComponentInfo *info)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
nsCOMPtr<nsICategoryManager>
|
||||
categoryManager(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = categoryManager->AddCategoryEntry(APPSTARTUP_CATEGORY,
|
||||
"SystemPref Module",
|
||||
NS_SYSTEMPREF_CONTRACTID,
|
||||
PR_TRUE, PR_TRUE, nsnull);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
static NS_METHOD
|
||||
UnRegisterSystemPref(nsIComponentManager *aCompMgr,
|
||||
nsIFile *aPath,
|
||||
const char *registryLocation,
|
||||
const nsModuleComponentInfo *info)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsICategoryManager>
|
||||
categoryManager(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = categoryManager->DeleteCategoryEntry(APPSTARTUP_CATEGORY,
|
||||
"SystemPref Module",
|
||||
PR_TRUE);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
static const nsModuleComponentInfo components[] = {
|
||||
{ NS_SYSTEMPREF_CLASSNAME,
|
||||
NS_SYSTEMPREF_CID,
|
||||
NS_SYSTEMPREF_CONTRACTID,
|
||||
nsSystemPrefConstructor,
|
||||
RegisterSystemPref,
|
||||
UnRegisterSystemPref,
|
||||
},
|
||||
{ NS_SYSTEMPREF_SERVICE_CLASSNAME,
|
||||
NS_SYSTEMPREF_SERVICE_CID,
|
||||
NS_SYSTEMPREF_SERVICE_CONTRACTID,
|
||||
nsSystemPrefServiceConstructor,
|
||||
},
|
||||
static const mozilla::Module::CIDEntry kSysPrefCIDs[] = {
|
||||
{ &kNS_SYSTEMPREF_CID, false, NULL, nsSystemPrefConstructor },
|
||||
{ &kNS_SYSTEMPREF_SERVICE_CID, false, NULL, nsSystemPrefServiceConstructor },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE(nsSystemPrefModule, components)
|
||||
static const mozilla::Module::ContractIDEntry kSysPrefContracts[] = {
|
||||
{ NS_SYSTEMPREF_CONTRACTID, &kNS_SYSTEMPREF_CID },
|
||||
{ NS_SYSTEMPREF_SERVICE_CONTRACTID, &kNS_SYSTEMPREF_SERVICE_CID },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const mozilla::Module::CategoryEntry kSysPrefCategories[] = {
|
||||
{ APPSTARTUP_CATEGORY, "SystemPref Module", NS_SYSTEMPREF_CONTRACTID },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const mozilla::Module kSysPrefModule = {
|
||||
mozilla::Module::kVersion,
|
||||
kSysPrefCIDs,
|
||||
kSysPrefContracts,
|
||||
kSysPrefCategories
|
||||
};
|
||||
|
||||
NSMODULE_DEFN(nsSystemPrefModule) = &kSysPrefModule;
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
#include "nsIFileView.h"
|
||||
#include "nsITreeView.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsITreeSelection.h"
|
||||
#include "nsITreeColumns.h"
|
||||
#include "nsITreeBoxObject.h"
|
||||
@ -263,17 +263,28 @@ protected:
|
||||
// Factory constructor
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFileComplete)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFileView, Init)
|
||||
NS_DEFINE_NAMED_CID(NS_FILECOMPLETE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_FILEVIEW_CID);
|
||||
|
||||
static const nsModuleComponentInfo components[] =
|
||||
{
|
||||
{ "nsFileComplete", NS_FILECOMPLETE_CID,
|
||||
NS_FILECOMPLETE_CONTRACTID, nsFileCompleteConstructor },
|
||||
{ "nsFileView", NS_FILEVIEW_CID,
|
||||
NS_FILEVIEW_CONTRACTID, nsFileViewConstructor }
|
||||
static const mozilla::Module::CIDEntry kFileViewCIDs[] = {
|
||||
{ &kNS_FILECOMPLETE_CID, false, NULL, nsFileCompleteConstructor },
|
||||
{ &kNS_FILEVIEW_CID, false, NULL, nsFileViewConstructor },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE(nsFileViewModule, components)
|
||||
static const mozilla::Module::ContractIDEntry kFileViewContracts[] = {
|
||||
{ NS_FILECOMPLETE_CONTRACTID, &kNS_FILECOMPLETE_CID },
|
||||
{ NS_FILEVIEW_CONTRACTID, &kNS_FILEVIEW_CID },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const mozilla::Module kFileViewModule = {
|
||||
mozilla::Module::kVersion,
|
||||
kFileViewCIDs,
|
||||
kFileViewContracts
|
||||
};
|
||||
|
||||
NSMODULE_DEFN(nsFileViewModule) = &kFileViewModule;
|
||||
|
||||
nsFileView::nsFileView() :
|
||||
mSortType(-1),
|
||||
|
@ -50,7 +50,7 @@
|
||||
#include "nsIBaseWindow.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsILocalFile.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
@ -603,14 +603,22 @@ Atom nsGTKRemoteService::sMozCommandLineAtom;
|
||||
{ 0xc0773e90, 0x5799, 0x4eff, { 0xad, 0x3, 0x3e, 0xbc, 0xd8, 0x56, 0x24, 0xac } }
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsGTKRemoteService)
|
||||
NS_DEFINE_NAMED_CID(NS_REMOTESERVICE_CID);
|
||||
|
||||
static const nsModuleComponentInfo components[] =
|
||||
{
|
||||
{ "Remote Service",
|
||||
NS_REMOTESERVICE_CID,
|
||||
"@mozilla.org/toolkit/remote-service;1",
|
||||
nsGTKRemoteServiceConstructor
|
||||
}
|
||||
static const mozilla::Module::CIDEntry kRemoteCIDs[] = {
|
||||
{ &kNS_REMOTESERVICE_CID, false, NULL, nsGTKRemoteServiceConstructor },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE(RemoteServiceModule, components)
|
||||
static const mozilla::Module::ContractIDEntry kRemoteContracts[] = {
|
||||
{ "@mozilla.org/toolkit/remote-service;1", &kNS_REMOTESERVICE_CID },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const mozilla::Module kRemoteModule = {
|
||||
mozilla::Module::kVersion,
|
||||
kRemoteCIDs,
|
||||
kRemoteContracts
|
||||
};
|
||||
|
||||
NSMODULE_DEFN(RemoteServiceModule) = &kRemoteModule;
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsICategoryManager.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsIAppStartupNotifier.h"
|
||||
#include "nsNetworkManagerListener.h"
|
||||
#include "nsNetCID.h"
|
||||
@ -56,15 +56,22 @@
|
||||
/* ===== XPCOM registration stuff ======== */
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNetworkManagerListener, Init)
|
||||
NS_DEFINE_NAMED_CID(NS_DBUS_NETWORK_LINK_SERVICE_CID);
|
||||
|
||||
static const nsModuleComponentInfo components[] = {
|
||||
{ NS_DBUS_NETWORK_LINK_SERVICE_CLASSNAME,
|
||||
NS_DBUS_NETWORK_LINK_SERVICE_CID,
|
||||
NS_NETWORK_LINK_SERVICE_CONTRACTID,
|
||||
nsNetworkManagerListenerConstructor,
|
||||
nsnull,
|
||||
nsnull,
|
||||
},
|
||||
static const mozilla::Module::CIDEntry kDBUSCIDs[] = {
|
||||
{ &kNS_DBUS_NETWORK_LINK_SERVICE_CID, false, NULL, nsNetworkManagerListenerConstructor },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE(nsDBusModule, components)
|
||||
static const mozilla::Module::ContractIDEntry kDBUSContracts[] = {
|
||||
{ NS_NETWORK_LINK_SERVICE_CONTRACTID, &kNS_DBUS_NETWORK_LINK_SERVICE_CID },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const mozilla::Module kDBUSModule = {
|
||||
mozilla::Module::kVersion,
|
||||
kDBUSCIDs,
|
||||
kDBUSContracts
|
||||
};
|
||||
|
||||
NSMODULE_DEFN(nsDBusModule) = &kDBUSModule;
|
||||
|
@ -37,7 +37,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsToolkitCompsCID.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
|
||||
#ifdef MOZ_ENABLE_GCONF
|
||||
#include "nsGConfService.h"
|
||||
@ -56,31 +56,56 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGIOService, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAlertsService, Init)
|
||||
#endif
|
||||
|
||||
static const nsModuleComponentInfo components[] = {
|
||||
#ifdef MOZ_ENABLE_GCONF
|
||||
{ "GConf Service",
|
||||
NS_GCONFSERVICE_CID,
|
||||
NS_GCONFSERVICE_CONTRACTID,
|
||||
nsGConfServiceConstructor },
|
||||
NS_DEFINE_NAMED_CID(NS_GCONFSERVICE_CID);
|
||||
#endif
|
||||
#ifdef MOZ_ENABLE_GNOMEVFS
|
||||
{ "GnomeVFS Service",
|
||||
NS_GNOMEVFSSERVICE_CID,
|
||||
NS_GNOMEVFSSERVICE_CONTRACTID,
|
||||
nsGnomeVFSServiceConstructor },
|
||||
NS_DEFINE_NAMED_CID(NS_GNOMEVFSSERVICE_CID);
|
||||
#endif
|
||||
#ifdef MOZ_ENABLE_GIO
|
||||
{ "GIO Service",
|
||||
NS_GIOSERVICE_CID,
|
||||
NS_GIOSERVICE_CONTRACTID,
|
||||
nsGIOServiceConstructor },
|
||||
NS_DEFINE_NAMED_CID(NS_GIOSERVICE_CID);
|
||||
#endif
|
||||
#ifdef MOZ_ENABLE_LIBNOTIFY
|
||||
{ "Gnome Alerts Service",
|
||||
NS_SYSTEMALERTSSERVICE_CID,
|
||||
NS_SYSTEMALERTSERVICE_CONTRACTID,
|
||||
nsAlertsServiceConstructor },
|
||||
NS_DEFINE_NAMED_CID(NS_SYSTEMALERTSSERVICE_CID);
|
||||
#endif
|
||||
|
||||
|
||||
static const mozilla::Module::CIDEntry kGnomeCIDs[] = {
|
||||
#ifdef MOZ_ENABLE_GCONF
|
||||
{ &kNS_GCONFSERVICE_CID, false, NULL, nsGConfServiceConstructor },
|
||||
#endif
|
||||
#ifdef MOZ_ENABLE_GNOMEVFS
|
||||
{ &kNS_GNOMEVFSSERVICE_CID, false, NULL, nsGnomeVFSServiceConstructor },
|
||||
#endif
|
||||
#ifdef MOZ_ENABLE_GIO
|
||||
{ &kNS_GIOSERVICE_CID, false, NULL, nsGIOServiceConstructor },
|
||||
#endif
|
||||
#ifdef MOZ_ENABLE_LIBNOTIFY
|
||||
{ &kNS_SYSTEMALERTSSERVICE_CID, false, NULL, nsAlertsServiceConstructor },
|
||||
#endif
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE(mozgnome, components)
|
||||
static const mozilla::Module::ContractIDEntry kGnomeContracts[] = {
|
||||
#ifdef MOZ_ENABLE_GCONF
|
||||
{ NS_GCONFSERVICE_CONTRACTID, &kNS_GCONFSERVICE_CID },
|
||||
#endif
|
||||
#ifdef MOZ_ENABLE_GNOMEVFS
|
||||
{ NS_GNOMEVFSSERVICE_CONTRACTID, &kNS_GNOMEVFSSERVICE_CID },
|
||||
#endif
|
||||
#ifdef MOZ_ENABLE_GIO
|
||||
{ NS_GIOSERVICE_CONTRACTID, &kNS_GIOSERVICE_CID },
|
||||
#endif
|
||||
#ifdef MOZ_ENABLE_LIBNOTIFY
|
||||
{ NS_SYSTEMALERTSERVICE_CONTRACTID, &kNS_SYSTEMALERTSSERVICE_CID },
|
||||
#endif
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const mozilla::Module kGnomeModule = {
|
||||
mozilla::Module::kVersion,
|
||||
kGnomeCIDs,
|
||||
kGnomeContracts
|
||||
};
|
||||
|
||||
NSMODULE_DEFN(mozgnome) = &kGnomeModule;
|
||||
|
@ -38,7 +38,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsISystemProxySettings.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIGConfService.h"
|
||||
#include "nsIURI.h"
|
||||
@ -417,12 +417,22 @@ nsUnixSystemProxySettings::GetProxyForURI(nsIURI* aURI, nsACString& aResult)
|
||||
{0x91, 0x81, 0xa2, 0x85, 0xe7, 0x4c, 0xf1, 0xd4 } }
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsUnixSystemProxySettings, Init)
|
||||
NS_DEFINE_NAMED_CID(NS_UNIXSYSTEMPROXYSERVICE_CID);
|
||||
|
||||
static const nsModuleComponentInfo components[] = {
|
||||
{ "Unix System Proxy Settings Service",
|
||||
NS_UNIXSYSTEMPROXYSERVICE_CID,
|
||||
NS_SYSTEMPROXYSETTINGS_CONTRACTID,
|
||||
nsUnixSystemProxySettingsConstructor }
|
||||
static const mozilla::Module::CIDEntry kUnixProxyCIDs[] = {
|
||||
{ &kNS_UNIXSYSTEMPROXYSERVICE_CID, false, NULL, nsUnixSystemProxySettingsConstructor },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE(nsUnixProxyModule, components)
|
||||
static const mozilla::Module::ContractIDEntry kUnixProxyContracts[] = {
|
||||
{ NS_SYSTEMPROXYSETTINGS_CONTRACTID, &kNS_UNIXSYSTEMPROXYSERVICE_CID },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const mozilla::Module kUnixProxyModule = {
|
||||
mozilla::Module::kVersion,
|
||||
kUnixProxyCIDs,
|
||||
kUnixProxyContracts
|
||||
};
|
||||
|
||||
NSMODULE_DEFN(nsUnixProxyModule) = &kUnixProxyModule;
|
||||
|
@ -297,7 +297,7 @@ static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
|
||||
#if defined(MOZ_X11)
|
||||
{ &kNS_IDLE_SERVICE_CID, false, NULL, nsIdleServiceGTKConstructor },
|
||||
#endif
|
||||
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
|
||||
@ -334,7 +334,7 @@ static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
|
||||
#if defined(MOZ_X11)
|
||||
{ "@mozilla.org/widget/idleservice;1", &kNS_IDLE_SERVICE_CID },
|
||||
#endif
|
||||
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user