new method GetExtantDocument. bug 36016 r=hyatt,pinkerton

This commit is contained in:
danm%netscape.com 2002-02-06 03:48:20 +00:00
Родитель e2313ce8f3
Коммит 56835e0fd7
3 изменённых файлов: 14 добавлений и 1 удалений

Просмотреть файл

@ -44,7 +44,6 @@
#include "nsString.h"
#include "nsIScriptContext.h"
#include "nsIDOMLocation.h"
#include "nsPIDOMWindow.h"
#include "nsIDOMXULCommandDispatcher.h"
#include "nsIDocument.h"
@ -81,6 +80,9 @@ public:
NS_IMETHOD GetRootFocusController(nsIFocusController** aResult) = 0;
// GetExtantDocument provides a backdoor to the DOM GetDocument accessor
NS_IMETHOD GetExtantDocument(nsIDOMDocument** aDocument) = 0;
NS_IMETHOD ReallyCloseWindow() = 0;
};

Просмотреть файл

@ -776,6 +776,15 @@ NS_IMETHODIMP GlobalWindowImpl::GetDocument(nsIDOMDocument** aDocument)
return NS_OK;
}
// like GetDocument, but merely fetches the document if it already exists
NS_IMETHODIMP GlobalWindowImpl::GetExtantDocument(nsIDOMDocument** aDocument)
{
NS_ENSURE_ARG_POINTER(aDocument);
*aDocument = mDocument;
NS_IF_ADDREF(*aDocument);
return NS_OK;
}
//*****************************************************************************
// GlobalWindowImpl::nsIDOMWindowInternal
//*****************************************************************************

Просмотреть файл

@ -181,6 +181,8 @@ public:
PRBool* aResult);
NS_IMETHOD SetMutationListeners(PRUint32 aEventType);
NS_IMETHOD GetRootFocusController(nsIFocusController** aResult);
NS_IMETHOD GetExtantDocument(nsIDOMDocument** aDocument);
NS_IMETHOD ReallyCloseWindow();
// nsIDOMViewCSS