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.



OnStateChange() Callback [ << Previous | Contents | Next >> ]
When URI's are loaded, your registered nsIWebProgressListener's methods will be called to provide you with status/progress...
  NS_IMETHODIMP 
  CBrowserImpl::OnStateChange(nsIWebProgress *progress, nsIRequest *request,
    PRInt32 state, PRUint32 status) {
   
   if ((state & STATE_START) && (state & STATE_IS_DOCUMENT))
   {
     // Navigation has begun
     if(m_pBrowserFrameGlue)
       m_pBrowserFrameGlue->UpdateBusyState(PR_TRUE);
   }

   if ((state & STATE_STOP) && (state & STATE_IS_DOCUMENT))
   {
     // We've completed the navigation
     m_pBrowserFrameGlue->UpdateBusyState(PR_FALSE);
     m_pBrowserFrameGlue->UpdateProgress(0, 100);       // Clear the prog bar
     m_pBrowserFrameGlue->UpdateStatusBarText(nsnull);  // Clear the status bar
   }
   return NS_OK;
  }