B2G/gecko/browser/components/downloads/content/downloads.js
/**
   * Starts loading the download data in background, without opening the panel.
   * Use showPanel instead to load the data and open the panel at the same time.
   *
   * @param aCallback
   *        Called when initialization is complete.
   */
Starts loading the download data in background, without opening the panel.
Use showPanel instead to load the data and open the panel at the same time.

@param aCallback
Called when initialization is complete.
Starts loading the download data in background without opening the panel . Use showPanel instead to load the data and open the panel at the same time . @param aCallback Called when initialization is complete .
function DP_initialize(aCallback)
  {
    if (this._state != this.kStateUninitialized) {
      DownloadsOverlayLoader.ensureOverlayLoaded(this.kDownloadsOverlay,
                                                 aCallback);
      return;
    }
    this._state = this.kStateHidden;
    window.addEventListener("unload", this.onWindowUnload, false);
    Services.downloads;
    DownloadsOverlayLoader.ensureOverlayLoaded(this.kDownloadsOverlay,
                                               function DP_I_callback() {
      DownloadsViewController.initialize();
      DownloadsCommon.data.addView(DownloadsView);
      aCallback();
    });
  }
function DP_initialize ( aCallback ) { if ( this . _state != this . kStateUninitialized ) { DownloadsOverlayLoader . ensureOverlayLoaded ( this . kDownloadsOverlay , aCallback ) ; return ; } this . _state = this . kStateHidden ; window . addEventListener ( "unload" , this . onWindowUnload , false ) ; Services . downloads ; DownloadsOverlayLoader . ensureOverlayLoaded ( this . kDownloadsOverlay , function DP_I_callback ( ) { DownloadsViewController . initialize ( ) ; DownloadsCommon . data . addView ( DownloadsView ) ; aCallback ( ) ; } ) ; }
Starts loading the download data in background, without opening the panel.
Starts loading the download data in background without opening the panel .
// Ensure that the Download Manager service is running.  This resumes // active downloads if required.  If there are downloads to be shown in the // panel, starting the service will make us load their data asynchronously. // Now that data loading has eventually started, load the required XUL // elements and initialize our views.