more work on 37983's content-policy love, r=brendan

This commit is contained in:
shaver%mozilla.org 2000-05-15 03:40:40 +00:00
Родитель 1ec23d5b9b
Коммит 2758dba757
2 изменённых файлов: 14 добавлений и 3 удалений

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

@ -59,6 +59,7 @@
#include "nsIBindingManager.h"
#include "nsIAutoCopy.h"
#include "nsContentPolicyUtils.h"
#include "nsIXIFConverter.h"
#include "nsINodeInfo.h"
@ -106,6 +107,7 @@ static NS_DEFINE_CID(kBindingManagerCID, NS_BINDINGMANAGER_CID);
static NS_DEFINE_CID(kDOMImplementationCID, NS_DOM_IMPLEMENTATION_CID);
static NS_DEFINE_CID(kNodeInfoManagerCID, NS_NODEINFOMANAGER_CID);
static NS_DEFINE_CID(kAutoCopyServiceCID, NS_AUTOCOPYSERVICE_CID);
static NS_DEFINE_CID(kContentPolicyCID, NS_CONTENTPOLICY_CID);
static NS_DEFINE_CID(kXIFConverterCID, NS_XIFCONVERTER_CID);
@ -135,6 +137,7 @@ extern nsresult NS_NewBindingManager(nsIBindingManager** aResult);
extern nsresult NS_NewNodeInfoManager(nsINodeInfoManager** aResult);
extern nsresult NS_NewAutoCopyService(nsIAutoCopyService** aResult);
extern nsresult NS_NewContentPolicy(nsIContentPolicy** aResult);
extern nsresult NS_NewXIFConverter(nsIXIFConverter** aResult);
@ -424,10 +427,17 @@ nsLayoutFactory::CreateInstance(nsISupports *aOuter,
}
else if (mClassID.Equals(kDOMImplementationCID)) {
res = NS_NewDOMImplementation((nsIDOMDOMImplementation**) &inst);
if (NS_FAILED(res)) {
if (NS_FAILED(res)) {
LOG_NEW_FAILURE("NS_NewDOMImplementation", res);
return res;
}
}
}
else if (mClassID.Equals(kContentPolicyCID)) {
res = NS_NewContentPolicy((nsIContentPolicy**) &inst);
if (NS_FAILED(res)) {
LOG_NEW_FAILURE("NS_NewContentPolicy", res);
return res;
}
}
else {
return NS_NOINTERFACE;

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

@ -67,6 +67,7 @@
#include "nsTextTransformer.h"
#include "nsIHTTPProtocolHandler.h"
#include "gbdate.h"
#include "nsContentPolicyUtils.h"
#define PRODUCT_NAME "Gecko"
static NS_DEFINE_CID(kHTTPHandlerCID, NS_IHTTPHANDLER_CID);
@ -357,8 +358,8 @@ static Components gComponents[] = {
{ "XBL Binding Manager", NS_BINDINGMANAGER_CID, "component://netscape/xbl/binding-manager" },
{ "AutoCopy Service", NS_AUTOCOPYSERVICE_CID, "component://netscape/autocopy" },
{ "Content policy service", NS_CONTENTPOLICY_CID, NS_CONTENTPOLICY_PROGID },
{ "XIF Converter", NS_XIFCONVERTER_CID, nsnull },
{ "NodeInfoManager", NS_NODEINFOMANAGER_CID, NS_NODEINFOMANAGER_PROGID }
};
#define NUM_COMPONENTS (sizeof(gComponents) / sizeof(gComponents[0]))