Tweak progressListener comments (bug 535596)
authorGavin Sharp <gavin@gavinsharp.com>
Thu, 17 Dec 2009 15:33:27 -0500
changeset 65932 0b34bdc01aec73539799206d9b25f1d6dc4f76ce
parent 65931 4598862a9c5b340588c0ded4786c19d10f220bf9
child 65933 3e198a6488889b90b9d33eac43d0dacbb6cfc9d6
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs535596
Tweak progressListener comments (bug 535596)
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -2537,27 +2537,29 @@ ProgressController.prototype = {
     return this._tab.browser;
   },
 
   onStateChange: function onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
     // ignore notification that aren't about the main document (iframes, etc)
     if (aWebProgress.DOMWindow != this._tab.browser.contentWindow)
       return;
 
+    // If you want to observe other state flags, be sure they're listed in the
+    // Tab._createBrowser's call to addProgressListener
     if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
       if (aStateFlags & Ci.nsIWebProgressListener.STATE_START)
         this._networkStart();
       else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP)
         this._networkStop();
     }
   },
 
   /** This method is called to indicate progress changes for the currently loading page. */
   onProgressChange: function onProgressChange(aWebProgress, aRequest, aCurSelf, aMaxSelf, aCurTotal, aMaxTotal) {
-    // To use this method, change the flags in Tab._createBrowser
+    // To use this method, add NOTIFY_PROGRESS to the flags in Tab._createBrowser
   },
 
   /** This method is called to indicate a change to the current location. */
   onLocationChange: function onLocationChange(aWebProgress, aRequest, aLocationURI) {
     let location = aLocationURI ? aLocationURI.spec : "";
 
     this._hostChanged = true;
     
@@ -2575,17 +2577,17 @@ ProgressController.prototype = {
     }
   },
 
   /**
    * This method is called to indicate a status changes for the currently
    * loading page.  The message is already formatted for display.
    */
   onStatusChange: function onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
-    // To use this method, change the flags in Tab._createBrowser
+    // To use this method, add NOTIFY_STATUS to the flags in Tab._createBrowser
   },
 
   /** This method is called when the security state of the browser changes. */
   onSecurityChange: function onSecurityChange(aWebProgress, aRequest, aState) {
     // Don't need to do anything if the data we use to update the UI hasn't changed
     if (this.state == aState && !this._hostChanged)
       return;