diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index bb15fb82075..f5206d70625 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -312,6 +312,15 @@ NS_IMETHODIMP nsDocShell::GetPresContext(nsIPresContext** aPresContext) return NS_OK; } +NS_IMETHODIMP nsDocShell::GetContentViewer(nsIContentViewer** aContentViewer) +{ + NS_ENSURE_ARG_POINTER(aContentViewer); + + *aContentViewer = mContentViewer; + NS_IF_ADDREF(*aContentViewer); + return NS_OK; +} + NS_IMETHODIMP nsDocShell::GetParent(nsIDocShell** parent) { NS_ENSURE_ARG_POINTER(parent); @@ -1616,15 +1625,6 @@ NS_IMETHODIMP nsDocShell::Embed(nsIContentViewer* aContentViewer, return NS_OK; } -NS_IMETHODIMP nsDocShell::GetContentViewer(nsIContentViewer** aContentViewer) -{ - NS_ENSURE_ARG_POINTER(aContentViewer); - - *aContentViewer = mContentViewer; - NS_IF_ADDREF(*aContentViewer); - return NS_OK; -} - NS_IMETHODIMP nsDocShell::HandleUnknownContentType(nsIDocumentLoader* aLoader, nsIChannel* channel, const char *aContentType, diff --git a/mozilla/docshell/base/nsDocShell.h b/mozilla/docshell/base/nsDocShell.h index 7ed943a1846..8490910e62a 100644 --- a/mozilla/docshell/base/nsDocShell.h +++ b/mozilla/docshell/base/nsDocShell.h @@ -88,8 +88,6 @@ public: const char* aCommand, nsISupports* aExtraInfo); - NS_IMETHOD GetContentViewer(nsIContentViewer** aResult); - NS_IMETHOD HandleUnknownContentType(nsIDocumentLoader* aLoader, nsIChannel* channel, const char *aContentType, diff --git a/mozilla/docshell/base/nsIDocShell.idl b/mozilla/docshell/base/nsIDocShell.idl index d936dfdeb97..8a7c4c7b508 100644 --- a/mozilla/docshell/base/nsIDocShell.idl +++ b/mozilla/docshell/base/nsIDocShell.idl @@ -29,6 +29,7 @@ %{ C++ #include "nsIPresContext.h" +#include "nsIContentViewer.h" #include "nsIDocumentLoaderObserver.h" %} @@ -51,6 +52,7 @@ [ptr] native nsIPresContext(nsIPresContext); [ptr] native nsIDocumentLoaderObserver(nsIDocumentLoaderObserver); +[ptr] native nsIContentViewer(nsIContentViewer); [scriptable, uuid(69E5DE00-7B8B-11d3-AF61-00A024FFC08C)] interface nsIDocShell : nsISupports @@ -115,6 +117,12 @@ interface nsIDocShell : nsISupports */ readonly attribute nsIPresContext presContext; + /* + Content Viewer that is currently loaded for this DocShell. This may change + as the underlying content changes. + */ + readonly attribute nsIContentViewer contentViewer; + /* Parent DocShell.. Note Implementers of this interface should NOT effect the lifetime of the parent DocShell by holding this reference as it creates