From 83ea2e4cb1ffd757100a8450672189383ad4a940 Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Sat, 22 Apr 2000 23:18:18 +0000 Subject: [PATCH] Bug #33156 --> the doc loader now implements nsIProgressEventSink. Add this support to getInterface for the docshell. git-svn-id: svn://10.0.0.236/trunk@66882 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsDocShell.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 4c9283af948..e0cded61e98 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -54,6 +54,7 @@ // Interfaces Needed #include "nsICharsetConverterManager.h" #include "nsIHTTPChannel.h" +#include "nsIProgressEventSink.h" #include "nsILayoutHistoryState.h" #include "nsILocaleService.h" #include "nsIPlatformCharset.h" @@ -172,6 +173,18 @@ NS_IMETHODIMP nsDocShell::GetInterface(const nsIID& aIID, void** aSink) else return NS_NOINTERFACE; } + else if (aIID.Equals(NS_GET_IID(nsIProgressEventSink))) + { + nsCOMPtr uriLoader(do_GetService(NS_URI_LOADER_PROGID)); + NS_ENSURE_TRUE(uriLoader, NS_ERROR_FAILURE); + nsCOMPtr docLoader; + NS_ENSURE_SUCCESS(uriLoader->GetDocumentLoaderForContext(NS_STATIC_CAST(nsIDocShell*, this), + getter_AddRefs(docLoader)), NS_ERROR_FAILURE); + if (docLoader) + return docLoader->QueryInterface(aIID, aSink); + else + return NS_ERROR_FAILURE; + } else return QueryInterface(aIID, aSink);