From da4c666d93d28bd04f52d8a2edbcdbe2774ea593 Mon Sep 17 00:00:00 2001 From: "danm%netscape.com" Date: Wed, 16 Jan 2002 00:11:06 +0000 Subject: [PATCH] support nsIEmbeddingSiteWindow. bug 57841 r=hyatt,saari --- xpfe/appshell/src/nsChromeTreeOwner.cpp | 3 +++ xpfe/appshell/src/nsXULWindow.cpp | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/xpfe/appshell/src/nsChromeTreeOwner.cpp b/xpfe/appshell/src/nsChromeTreeOwner.cpp index 457a188aed8..9770d0498b9 100644 --- a/xpfe/appshell/src/nsChromeTreeOwner.cpp +++ b/xpfe/appshell/src/nsChromeTreeOwner.cpp @@ -26,6 +26,7 @@ // Helper Classes #include "nsString.h" +#include "nsIEmbeddingSiteWindow.h" #include "nsIEmbeddingSiteWindow2.h" #include "nsIGenericFactory.h" #include "nsIServiceManager.h" @@ -83,6 +84,8 @@ NS_IMETHODIMP nsChromeTreeOwner::GetInterface(const nsIID& aIID, void** aSink) return mXULWindow->GetInterface(aIID, aSink); if(aIID.Equals(NS_GET_IID(nsIWebBrowserChrome))) return mXULWindow->GetInterface(aIID, aSink); + if (aIID.Equals(NS_GET_IID(nsIEmbeddingSiteWindow))) + return mXULWindow->GetInterface(aIID, aSink); if (aIID.Equals(NS_GET_IID(nsIEmbeddingSiteWindow2))) return mXULWindow->GetInterface(aIID, aSink); if (aIID.Equals(NS_GET_IID(nsIXULWindow))) diff --git a/xpfe/appshell/src/nsXULWindow.cpp b/xpfe/appshell/src/nsXULWindow.cpp index 74544c2f9aa..0f972c85221 100644 --- a/xpfe/appshell/src/nsXULWindow.cpp +++ b/xpfe/appshell/src/nsXULWindow.cpp @@ -42,6 +42,7 @@ #include "nsIDOMWindowInternal.h" #include "nsIDOMScreen.h" #include "nsIDOMXULDocument.h" +#include "nsIEmbeddingSiteWindow.h" #include "nsIEmbeddingSiteWindow2.h" #include "nsIInterfaceRequestor.h" #include "nsIInterfaceRequestorUtils.h" @@ -152,6 +153,10 @@ NS_IMETHODIMP nsXULWindow::GetInterface(const nsIID& aIID, void** aSink) NS_SUCCEEDED(mContentTreeOwner->QueryInterface(aIID, aSink))) return NS_OK; + if (aIID.Equals(NS_GET_IID(nsIEmbeddingSiteWindow)) && + NS_SUCCEEDED(EnsureContentTreeOwner()) && + NS_SUCCEEDED(mContentTreeOwner->QueryInterface(aIID, aSink))) + return NS_OK; if (aIID.Equals(NS_GET_IID(nsIEmbeddingSiteWindow2)) && NS_SUCCEEDED(EnsureContentTreeOwner()) && NS_SUCCEEDED(mContentTreeOwner->QueryInterface(aIID, aSink)))