- adding stubs for the methods in nsIWebShellServices implemented by the nsWebShell object.

- adding a stub implementation of the GetContentViewerContainer() method to nsDocLoaderImpl.
This commit is contained in:
nisheeth@netscape.com
1999-05-06 01:58:48 +00:00
parent f9d0dd66a8
commit 6a57a0ae3b
4 changed files with 94 additions and 0 deletions

View File

@@ -56,6 +56,7 @@
#include "nsCOMPtr.h"
#include "nsIPresShell.h"
#include "nsIStreamObserver.h"
#include "nsIWebShellServices.h"
#ifdef XP_PC
#include <windows.h>
@@ -116,6 +117,7 @@ void nsWebShell_SetUnixEventQueue(PLEventQueue* aEventQueue)
class nsWebShell : public nsIWebShell,
public nsIWebShellContainer,
public nsIWebShellServices,
public nsILinkHandler,
public nsIScriptContextOwner,
public nsIDocumentLoaderObserver,
@@ -242,6 +244,11 @@ public:
NS_IMETHOD FindWebShellWithName(const PRUnichar* aName, nsIWebShell*& aResult);
NS_IMETHOD FocusAvailable(nsIWebShell* aFocusedWebShell, PRBool& aFocusTaken);
// nsIWebShellServices
NS_IMETHOD LoadDocument(const char* aURL);
NS_IMETHOD StopDocumentLoad(void);
NS_IMETHOD SetRendering(PRBool aRender);
// nsILinkHandler
NS_IMETHOD OnLinkClick(nsIContent* aContent,
nsLinkVerb aVerb,
@@ -424,6 +431,7 @@ static NS_DEFINE_IID(kIStreamObserverIID, NS_ISTREAMOBSERVER_IID);
static NS_DEFINE_IID(kINetSupportIID, NS_INETSUPPORT_IID);
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kIWebShellIID, NS_IWEB_SHELL_IID);
static NS_DEFINE_IID(kIWebShellServicesIID, NS_IWEB_SHELL_SERVICES_IID);
static NS_DEFINE_IID(kIWidgetIID, NS_IWIDGET_IID);
static NS_DEFINE_IID(kIPluginManagerIID, NS_IPLUGINMANAGER_IID);
static NS_DEFINE_IID(kIPluginHostIID, NS_IPLUGINHOST_IID);
@@ -616,6 +624,11 @@ nsWebShell::QueryInterface(REFNSIID aIID, void** aInstancePtr)
if (NULL == aInstancePtr) {
return NS_ERROR_NULL_POINTER;
}
if (aIID.Equals(kIWebShellServicesIID)) {
*aInstancePtr = (void*)(nsIWebShellServices*)this;
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(kIWebShellIID)) {
*aInstancePtr = (void*)(nsIWebShell*)this;
NS_ADDREF_THIS();
@@ -1919,6 +1932,30 @@ nsWebShell::FocusAvailable(nsIWebShell* aFocusedWebShell, PRBool& aFocusTaken)
return NS_OK;
}
//----------------------------------------------------------------------
// Web Shell Services API
NS_IMETHODIMP
nsWebShell::LoadDocument(const char* aURL)
{
return NS_OK;
}
NS_IMETHODIMP
nsWebShell::StopDocumentLoad(void)
{
return NS_OK;
}
NS_IMETHODIMP
nsWebShell::SetRendering(PRBool aRender)
{
return NS_OK;
}
//----------------------------------------------------------------------
// WebShell link handling