nsIDocShell now has a readonly attribute for the currently loaded content viewer.

git-svn-id: svn://10.0.0.236/trunk@53563 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
tbogard%aol.net 1999-11-15 22:54:47 +00:00
parent 50e9fca03a
commit bda092db4e
3 changed files with 17 additions and 11 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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