First impl of view source and NewWindow2 (thanks Neoplanet!)

Changes to IOleCommandTarget


git-svn-id: svn://10.0.0.236/trunk@30259 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
locka%iol.ie
1999-05-04 22:45:22 +00:00
parent 893617ed6e
commit 72b1c2f3ec
7 changed files with 261 additions and 45 deletions

View File

@@ -267,12 +267,34 @@ CWebShellContainer::CanCreateNewWebShell(PRBool& aResult)
return rv;
}
NS_IMETHODIMP
CWebShellContainer::SetNewWebShellInfo(const nsString& aName, const nsString& anURL,
CWebShellContainer::SetNewWebShellInfo(const nsString& aName, const nsString& anURL,
nsIWebShell* aOpenerShell, PRUint32 aChromeMask,
nsIWebShell** aNewShell, nsIWebShell** anInnerShell)
{
nsresult rv = NS_ERROR_FAILURE;
CIPtr(IDispatch) cpDispNew;
VARIANT_BOOL bCancel = VARIANT_FALSE;
m_pEvents2->Fire_NewWindow2(&cpDispNew, &bCancel);
if (bCancel == VARIANT_FALSE && cpDispNew)
{
CIPtr(IWebBrowser2) cpOther = cpDispNew;
if (cpDispNew)
{
BSTR bstrURL = SysAllocString(anURL);
CComVariant vURL(bstrURL);
VARIANT vNull;
vNull.vt = VT_NULL;
cpOther->Navigate2(&vURL, &vNull, &vNull, &vNull, &vNull);
SysFreeString(bstrURL);
}
rv = NS_OK;
}
return rv;
}