This commit is contained in:
hyatt%netscape.com 1999-05-28 22:15:57 +00:00
Родитель 9970148ca8
Коммит aa3038f6b1
2 изменённых файлов: 19 добавлений и 0 удалений

Просмотреть файл

@ -130,4 +130,8 @@
#define NS_XULPOPUPLISTENER_CID \
{ 0x3986b301, 0x97c, 0x11d3, { 0xbf, 0x87, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } }
// {FE71D561-1501-11d3-BF87-00105A1B0627}
#define NS_XULFOCUSTRACKER_CID \
{ 0xfe71d561, 0x1501, 0x11d3, { 0xbf, 0x87, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } }
#endif // nsRDFCID_h__

Просмотреть файл

@ -45,6 +45,7 @@
#include "nsIXULSortService.h"
#include "nsIXULDocumentInfo.h"
#include "nsIXULPopupListener.h"
#include "nsIXULFocusTracker.h"
#include "nsIServiceManager.h"
#include "nsCOMPtr.h"
@ -77,6 +78,7 @@ static NS_DEFINE_CID(kXULDocumentCID, NS_XULDOCUMENT_CID);
static NS_DEFINE_CID(kXULSortServiceCID, NS_XULSORTSERVICE_CID);
static NS_DEFINE_CID(kXULDocumentInfoCID, NS_XULDOCUMENTINFO_CID);
static NS_DEFINE_CID(kXULPopupListenerCID, NS_XULPOPUPLISTENER_CID);
static NS_DEFINE_CID(kXULFocusTrackerCID, NS_XULFOCUSTRACKER_CID);
class RDFFactoryImpl : public nsIFactory
{
@ -172,6 +174,10 @@ RDFFactoryImpl::CreateInstance(nsISupports *aOuter,
if (NS_FAILED(rv = NS_NewXULPopupListener((nsIXULPopupListener**) &inst)))
return rv;
}
else if (mClassID.Equals(kXULFocusTrackerCID)) {
if (NS_FAILED(rv = NS_NewXULFocusTracker((nsIXULFocusTracker**) &inst)))
return rv;
}
else if (mClassID.Equals(kRDFInMemoryDataSourceCID)) {
if (NS_FAILED(rv = NS_NewRDFInMemoryDataSource((nsIRDFDataSource**) &inst)))
@ -457,6 +463,13 @@ NSRegisterSelf(nsISupports* aServMgr , const char* aPath)
"XUL PopupListener",
NS_RDF_PROGID "/xul-popup-listener",
aPath, PR_TRUE, PR_TRUE);
if (NS_FAILED(rv)) goto done;
rv = compMgr->RegisterComponent(kXULFocusTrackerCID,
"XUL FocusTracker",
NS_RDF_PROGID "/xul-focus-tracker",
aPath, PR_TRUE, PR_TRUE);
done:
(void)servMgr->ReleaseService(kComponentManagerCID, compMgr);
return rv;
@ -524,6 +537,8 @@ NSUnregisterSelf(nsISupports* aServMgr, const char* aPath)
rv = compMgr->UnregisterComponent(kXULDocumentInfoCID, aPath);
if (NS_FAILED(rv)) goto done;
rv = compMgr->UnregisterComponent(kXULPopupListenerCID, aPath);
if (NS_FAILED(rv)) goto done;
rv = compMgr->UnregisterComponent(kXULFocusTrackerCID, aPath);
done:
(void)servMgr->ReleaseService(kComponentManagerCID, compMgr);