104 lines
2.2 KiB
C++
104 lines
2.2 KiB
C++
#include "stdafx.h"
|
|
|
|
#include "WebShellContainer.h"
|
|
|
|
|
|
static NS_DEFINE_IID(kIWebShellContainerIID, NS_IWEB_SHELL_CONTAINER_IID);
|
|
|
|
|
|
CWebShellContainer::CWebShellContainer()
|
|
{
|
|
}
|
|
|
|
|
|
CWebShellContainer::~CWebShellContainer()
|
|
{
|
|
}
|
|
|
|
NS_IMPL_ADDREF(CWebShellContainer)
|
|
NS_IMPL_RELEASE(CWebShellContainer)
|
|
|
|
nsresult CWebShellContainer::QueryInterface(const nsIID& aIID, void** aInstancePtrResult)
|
|
{
|
|
NS_PRECONDITION(nsnull != aInstancePtrResult, "null pointer");
|
|
if (nsnull == aInstancePtrResult) {
|
|
return NS_ERROR_NULL_POINTER;
|
|
}
|
|
|
|
*aInstancePtrResult = NULL;
|
|
/*
|
|
if (aIID.Equals(kIBrowserWindowIID)) {
|
|
*aInstancePtrResult = (void*) ((nsIBrowserWindow*)this);
|
|
AddRef();
|
|
return NS_OK;
|
|
}
|
|
if (aIID.Equals(kIStreamObserverIID)) {
|
|
*aInstancePtrResult = (void*) ((nsIStreamObserver*)this);
|
|
AddRef();
|
|
return NS_OK;
|
|
}
|
|
*/
|
|
if (aIID.Equals(kIWebShellContainerIID)) {
|
|
*aInstancePtrResult = (void*) ((nsIWebShellContainer*)this);
|
|
AddRef();
|
|
return NS_OK;
|
|
}
|
|
/* if (aIID.Equals(kINetSupportIID)) {
|
|
*aInstancePtrResult = (void*) ((nsINetSupport*)this);
|
|
AddRef();
|
|
return NS_OK;
|
|
}
|
|
if (aIID.Equals(kISupportsIID)) {
|
|
*aInstancePtrResult = (void*) ((nsISupports*)((nsIBrowserWindow*)this));
|
|
AddRef();
|
|
return NS_OK;
|
|
}
|
|
*/
|
|
return NS_NOINTERFACE;
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
CWebShellContainer::WillLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, nsLoadType aReason)
|
|
{
|
|
// if (mStatus) {
|
|
// nsAutoString url("Connecting to ");
|
|
// url.Append(aURL);
|
|
// mStatus->SetText(url);
|
|
// }
|
|
return NS_OK;
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
CWebShellContainer::BeginLoadURL(nsIWebShell* aShell, const PRUnichar* aURL)
|
|
{
|
|
// if (mThrobber) {
|
|
// mThrobber->Start();
|
|
// mLocation->SetText(aURL);
|
|
// }
|
|
return NS_OK;
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
CWebShellContainer::ProgressLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, PRInt32 aProgress, PRInt32 aProgressMax)
|
|
{
|
|
return NS_OK;
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
CWebShellContainer::EndLoadURL(nsIWebShell* aShell, const PRUnichar* aURL, PRInt32 aStatus)
|
|
{
|
|
// if (mThrobber) {
|
|
// mThrobber->Stop();
|
|
// }
|
|
return NS_OK;
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
CWebShellContainer::NewWebShell(nsIWebShell *&aNewWebShell)
|
|
{
|
|
nsresult rv = NS_OK;
|
|
rv = NS_ERROR_OUT_OF_MEMORY;
|
|
return rv;
|
|
}
|
|
|