Bug 251481 remove nsIDocStreamLoaderFactory r+sr=bz

This commit is contained in:
cbiesinger%web.de 2004-07-15 16:12:22 +00:00
Родитель 40d88b99b2
Коммит db061512a0
4 изменённых файлов: 3 добавлений и 85 удалений

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

@ -60,7 +60,6 @@
#include "nsRDFCID.h"
#include "nsIRDFResource.h"
#include "nsIDocStreamLoaderFactory.h"
#include "imgILoader.h"
@ -146,9 +145,8 @@ nsContentDLF::~nsContentDLF()
{
}
NS_IMPL_ISUPPORTS2(nsContentDLF,
nsIDocumentLoaderFactory,
nsIDocStreamLoaderFactory)
NS_IMPL_ISUPPORTS1(nsContentDLF,
nsIDocumentLoaderFactory)
NS_IMETHODIMP
nsContentDLF::CreateInstance(const char* aCommand,
@ -437,34 +435,6 @@ nsContentDLF::CreateDocument(const char* aCommand,
return rv;
}
NS_IMETHODIMP
nsContentDLF::CreateInstance(nsIInputStream& aInputStream,
const char* aContentType,
const char* aCommand,
nsISupports* aContainer,
nsISupports* aExtraInfo,
nsIContentViewer** aDocViewer)
{
nsresult status = NS_ERROR_FAILURE;
EnsureUAStyleSheet();
// Try RDF
int typeIndex = 0;
while (gRDFTypes[typeIndex]) {
if (0 == PL_strcmp(gRDFTypes[typeIndex++], aContentType)) {
return CreateXULDocumentFromStream(aInputStream,
aCommand,
aContainer,
aExtraInfo,
aDocViewer);
}
}
return status;
}
// ...common work for |CreateRDFDocument| and |CreateXULDocumentFromStream|
nsresult
nsContentDLF::CreateRDFDocument(nsISupports* aExtraInfo,
@ -531,41 +501,6 @@ nsContentDLF::CreateRDFDocument(const char* aCommand,
return rv;
}
nsresult
nsContentDLF::CreateXULDocumentFromStream(nsIInputStream& aXULStream,
const char* aCommand,
nsISupports* aContainer,
nsISupports* aExtraInfo,
nsIContentViewer** aDocViewer)
{
nsresult status = NS_OK;
#if 0 // XXX dead code; remove
do
{
nsCOMPtr<nsIDocument> doc;
nsCOMPtr<nsIDocumentViewer> docv;
if ( NS_FAILED(status = CreateRDFDocument(aExtraInfo, address_of(doc), address_of(docv))) )
break;
if ( NS_FAILED(status = docv->LoadStart(doc)) )
break;
*aDocViewer = docv;
NS_IF_ADDREF(*aDocViewer);
nsCOMPtr<nsIStreamLoadableDocument> loader = do_QueryInterface(doc, &status);
if ( NS_FAILED(status) )
break;
status = loader->LoadFromStream(aXULStream, aContainer, aCommand);
}
while (0);
#endif
return status;
}
static nsresult
RegisterTypes(nsICategoryManager* aCatMgr,
const char* const* aTypes)

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

@ -39,7 +39,6 @@
#define nsContentDLF_h__
#include "nsIDocumentLoaderFactory.h"
#include "nsIDocStreamLoaderFactory.h"
#include "nsIDocumentViewer.h"
#include "nsIDocument.h"
@ -54,8 +53,7 @@ class nsILoadGroup;
class nsIStreamListener;
struct nsModuleComponentInfo;
class nsContentDLF : public nsIDocumentLoaderFactory,
public nsIDocStreamLoaderFactory
class nsContentDLF : public nsIDocumentLoaderFactory
{
public:
nsContentDLF();
@ -64,14 +62,6 @@ public:
NS_DECL_ISUPPORTS
NS_DECL_NSIDOCUMENTLOADERFACTORY
// for nsIDocStreamLoaderFactory
NS_METHOD CreateInstance(nsIInputStream& aInputStream,
const char* aContentType,
const char* aCommand,
nsISupports* aContainer,
nsISupports* aExtraInfo,
nsIContentViewer** aDocViewer);
nsresult InitUAStyleSheet();
nsresult CreateDocument(const char* aCommand,
@ -91,12 +81,6 @@ public:
nsIStreamListener** aDocListener,
nsIContentViewer** aDocViewer);
nsresult CreateXULDocumentFromStream(nsIInputStream& aXULStream,
const char* aCommand,
nsISupports* aContainer,
nsISupports* aExtraInfo,
nsIContentViewer** aDocViewer);
nsresult CreateRDFDocument(nsISupports*,
nsCOMPtr<nsIDocument>*,
nsCOMPtr<nsIDocumentViewer>*);

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

@ -62,7 +62,6 @@ XPIDLSRCS = \
$(NULL)
EXPORTS = \
nsIDocStreamLoaderFactory.h \
nsILinkHandler.h \
nsIWebShell.h \
nsIWebShellServices.h \

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