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

This commit is contained in:
tbogard@aol.net
1999-11-15 22:54:47 +00:00
parent e555935545
commit e8bb8e11bd
3 changed files with 17 additions and 11 deletions

View File

@@ -312,6 +312,15 @@ NS_IMETHODIMP nsDocShell::GetPresContext(nsIPresContext** aPresContext)
return NS_OK; 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_IMETHODIMP nsDocShell::GetParent(nsIDocShell** parent)
{ {
NS_ENSURE_ARG_POINTER(parent); NS_ENSURE_ARG_POINTER(parent);
@@ -1616,15 +1625,6 @@ NS_IMETHODIMP nsDocShell::Embed(nsIContentViewer* aContentViewer,
return NS_OK; 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, NS_IMETHODIMP nsDocShell::HandleUnknownContentType(nsIDocumentLoader* aLoader,
nsIChannel* channel, nsIChannel* channel,
const char *aContentType, const char *aContentType,

View File

@@ -88,8 +88,6 @@ public:
const char* aCommand, const char* aCommand,
nsISupports* aExtraInfo); nsISupports* aExtraInfo);
NS_IMETHOD GetContentViewer(nsIContentViewer** aResult);
NS_IMETHOD HandleUnknownContentType(nsIDocumentLoader* aLoader, NS_IMETHOD HandleUnknownContentType(nsIDocumentLoader* aLoader,
nsIChannel* channel, nsIChannel* channel,
const char *aContentType, const char *aContentType,

View File

@@ -29,6 +29,7 @@
%{ C++ %{ C++
#include "nsIPresContext.h" #include "nsIPresContext.h"
#include "nsIContentViewer.h"
#include "nsIDocumentLoaderObserver.h" #include "nsIDocumentLoaderObserver.h"
%} %}
@@ -51,6 +52,7 @@
[ptr] native nsIPresContext(nsIPresContext); [ptr] native nsIPresContext(nsIPresContext);
[ptr] native nsIDocumentLoaderObserver(nsIDocumentLoaderObserver); [ptr] native nsIDocumentLoaderObserver(nsIDocumentLoaderObserver);
[ptr] native nsIContentViewer(nsIContentViewer);
[scriptable, uuid(69E5DE00-7B8B-11d3-AF61-00A024FFC08C)] [scriptable, uuid(69E5DE00-7B8B-11d3-AF61-00A024FFC08C)]
interface nsIDocShell : nsISupports interface nsIDocShell : nsISupports
@@ -115,6 +117,12 @@ interface nsIDocShell : nsISupports
*/ */
readonly attribute nsIPresContext presContext; 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 Parent DocShell.. Note Implementers of this interface should NOT effect
the lifetime of the parent DocShell by holding this reference as it creates the lifetime of the parent DocShell by holding this reference as it creates