embedding/browser/photon/src/EmbedPrintListener.cpp,1.1 | . | Disk File |
Skipping to line 38 | . | |
|
. |
|
EmbedPrintListener::~EmbedPrintListener() |
. |
EmbedPrintListener::~EmbedPrintListener() |
{ |
. |
{ |
} |
. |
} |
|
. |
|
NS_IMPL_ISUPPORTS1(EmbedPrintListener, nsIPrintListener) |
. |
NS_IMPL_ISUPPORTS1(EmbedPrintListener, nsIWebProgressListener) |
|
. |
|
nsresult |
. |
nsresult |
EmbedPrintListener::Init(EmbedPrivate *aOwner) |
. |
EmbedPrintListener::Init(EmbedPrivate *aOwner) |
{ |
. |
{ |
mOwner = aOwner; |
. |
mOwner = aOwner; |
Skipping to line 70 | . | |
pstatus.max = max; |
. |
pstatus.max = max; |
pstatus.cur = cur; |
. |
pstatus.cur = cur; |
PtInvokeCallbackList(cb, (PtWidget_t *)moz, &cbinfo); |
. |
PtInvokeCallbackList(cb, (PtWidget_t *)moz, &cbinfo); |
} |
. |
} |
|
. |
|
/* void OnStartPrinting (); */
|
. |
/* void onStateChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest,
in long aStateFlags, in unsigned long aStatus); */ |
NS_IMETHODIMP
|
. |
NS_IMETHODIMP EmbedPrintListener::OnStateChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest, PRInt32 aStateFlags, PRUint32 aStatus) |
EmbedPrintListener::OnStartPrinting() |
. |
  |
{ |
. |
{ |
InvokePrintCallback(Pt_MOZ_PRINT_START, 0, 0); |
. |
if (aStatus == nsIWebProgressListener::STATE_START) { |
return NS_OK; |
. |
InvokePrintCallback(Pt_MOZ_PRINT_START, 0, 0); |
  |
. |
|
  |
. |
} else if (aStatus == nsIWebProgressListener::STATE_STOP) { |
  |
. |
InvokePrintCallback(Pt_MOZ_PRINT_COMPLETE, 0, 0); |
  |
. |
} |
  |
. |
return NS_OK; |
  |
. |
} |
  |
. |
|
 
|
. |
/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aReque
st, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgr
ess, in long aMaxTotalProgress); */ |
 
|
. |
NS_IMETHODIMP EmbedPrintListener::OnProgressChange(nsIWebProgress *aWebProgres
s, nsIRequest *aRequest, PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress, P
RInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress) |
  |
. |
{ |
 
|
. |
InvokePrintCallback(Pt_MOZ_PRINT_PROGRESS, aCurTotalProgress, aMaxTotalProgre
ss); |
  |
. |
return NS_OK; |
  |
. |
} |
  |
. |
|
 
|
. |
/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aReque
st, in nsIURI location); */ |
 
|
. |
NS_IMETHODIMP EmbedPrintListener::OnLocationChange(nsIWebProgress *aWebProgres
s, nsIRequest *aRequest, nsIURI *location) |
  |
. |
{ |
  |
. |
return NS_ERROR_NOT_IMPLEMENTED; |
} |
. |
} |
|
. |
|
/* void OnProgressPrinting (in PRUint32 aProgress, in PRUint32 aProgressMax);
*/ |
. |
/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest
, in nsresult aStatus, in wstring aMessage); */ |
NS_IMETHODIMP
|
. |
NS_IMETHODIMP EmbedPrintListener::OnStatusChange(nsIWebProgress *aWebProgress,
nsIRequest *aRequest, nsresult aStatus, const PRUnichar *aMessage) |
EmbedPrintListener::OnProgressPrinting(PRUint32 aProgress, PRUint32 aProgressM
ax) |
. |
 
|
{ |
. |
{ |
InvokePrintCallback(Pt_MOZ_PRINT_PROGRESS, aProgress, aProgressMax); |
. |
return NS_ERROR_NOT_IMPLEMENTED; |
return NS_OK; |
. |
  |
} |
. |
} |
|
. |
|
/* void OnEndPrinting (in PRUint32 aStatus); */
|
. |
/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aReque
st, in long state); */ |
NS_IMETHODIMP
|
. |
NS_IMETHODIMP EmbedPrintListener::OnSecurityChange(nsIWebProgress *aWebProgres
s, nsIRequest *aRequest, PRInt32 state) |
EmbedPrintListener::OnEndPrinting(PRUint32 aStatus) |
. |
  |
{ |
. |
{ |
InvokePrintCallback(Pt_MOZ_PRINT_COMPLETE, 0, 0); |
. |
return NS_ERROR_NOT_IMPLEMENTED; |
return NS_OK; |
. |
  |
} |
. |
} |