** Patch provided by dougt ** Create parser-service category.b=107087, r=harishd, sr=alecf

git-svn-id: svn://10.0.0.236/trunk@114537 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
harishd%netscape.com
2002-02-14 23:18:28 +00:00
parent 1d1f95e7c0
commit d4204329ee
6 changed files with 47 additions and 6 deletions

View File

@@ -22,10 +22,12 @@
#include "nsParserService.h"
#include "nsHTMLEntities.h"
#include "nsElementTable.h"
#include "nsICategoryManager.h"
nsParserService::nsParserService() : mEntries(0)
{
NS_INIT_ISUPPORTS();
mHaveNotifiedCategoryObservers = PR_FALSE;
}
nsParserService::~nsParserService()
@@ -185,6 +187,14 @@ nsParserService::GetTopicObservers(const nsAString& aTopic,
nsObserverEntry*
nsParserService::GetEntry(const nsAString& aTopic)
{
if(!mHaveNotifiedCategoryObservers) {
mHaveNotifiedCategoryObservers = PR_TRUE;
NS_CreateServicesFromCategory("parser-service-category",
NS_STATIC_CAST(nsISupports*,NS_STATIC_CAST(void*,this)),
"parser-service-start");
}
PRInt32 index = 0;
nsObserverEntry* entry = nsnull;

View File

@@ -63,6 +63,7 @@ protected:
nsObserverEntry** aEntry);
nsDeque mEntries; //each topic holds a list of observers per tag.
PRBool mHaveNotifiedCategoryObservers;
};
#endif