fixed compiler bugs. removed nsIWebBrowser.cpp because of naming conflict, adding nsIWebBrow.cpp for test cases.

a=asa for QA checkins that are not part of the default builds


git-svn-id: svn://10.0.0.236/trunk@121958 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
depstein%netscape.com
2002-05-21 21:37:34 +00:00
parent ee500f9e22
commit 409d03e52e
10 changed files with 99 additions and 93 deletions

View File

@@ -2,12 +2,11 @@
//
#include "stdafx.h"
#include "Testembed.h"
#include "testembed.h"
#include "PrintProgressDialog.h"
#include "BrowserView.h"
#include "nsIWebBrowser.h"
#include "nsIWebBrowserPrint.h"
#include "nsIWebProgressListener.h"
#ifdef _DEBUG
#define new DEBUG_NEW
@@ -50,9 +49,9 @@ CDlgPrintListener::CDlgPrintListener(CPrintProgressDialog* aDlg) :
//NS_ADDREF_THIS();
}
/* void onStateChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aStateFlags, in unsigned long aStatus); */
/* void onStateChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long aStateFlags, in nsresult aStatus); */
NS_IMETHODIMP
CDlgPrintListener::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRInt32 aStateFlags, PRUint32 aStatus)
CDlgPrintListener::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRUint32 aStateFlags, nsresult aStatus)
{
if (m_PrintDlg) {
if (aStateFlags == (nsIWebProgressListener::STATE_START|nsIWebProgressListener::STATE_IS_DOCUMENT)) {
@@ -79,21 +78,21 @@ CDlgPrintListener::OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aR
NS_IMETHODIMP
CDlgPrintListener::OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *location)
{
return NS_ERROR_NOT_IMPLEMENTED;
return NS_OK;
}
/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */
NS_IMETHODIMP
CDlgPrintListener::OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus, const PRUnichar *aMessage)
{
return NS_ERROR_NOT_IMPLEMENTED;
return NS_OK;
}
/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long state); */
NS_IMETHODIMP
CDlgPrintListener::OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, PRUint32 state)
{
return NS_ERROR_NOT_IMPLEMENTED;
return NS_OK;
}
@@ -190,7 +189,7 @@ BOOL CPrintProgressDialog::OnInitDialog()
int CPrintProgressDialog::DoModal( )
{
PRBool doModal = PR_FALSE;
nsCOMPtr<nsIWebBrowserPrint> print(do_GetInterface(m_WebBrowser));
nsCOMPtr<nsIWebBrowserPrint> print(do_GetInterface(m_WebBrowser));
if(print)
{
m_PrintListener = new CDlgPrintListener(this); // constructor addrefs