Receiving progress callbacks << Previous |  Contents  |  Next >>  ]
Receiving progress callbacks Gets called while the bytes are being downloaded from the wire...
NS_IMETHODIMP
CBrowserImpl::OnProgressChange(nsIWebProgress *progress, nsIRequest *request,
    PRInt32 curSelfProgress, PRInt32 maxSelfProgress,
    PRInt32 curTotalProgress, PRInt32 maxTotalProgress) {

  PRInt32 nProgress = curTotalProgress;
  PRInt32 nProgressMax = maxTotalProgress;

  if (nProgressMax == 0)
    nProgressMax = LONG_MAX;

  if (nProgress > nProgressMax)
    nProgress = nProgressMax; // Progress complete

  m_pBrowserFrameGlue->UpdateProgress(nProgress, nProgressMax);

  return NS_OK;
}