You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



OnProgressChange() Callback [ << Previous | Contents | Next >> ]
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;
  }