author Robert Strong <>
Mon, 22 Aug 2016 12:48:16 -0700
changeset 347791 ddd7e7dd100e8f631696a0060f7ac5bcb2345d0b
parent 98529 f4157e8c410708d76703f19e4dfb61859bfe32d8
permissions -rw-r--r--
Bug 1287176 client code - Status file not written for staging errors. r=mhowell, a=rkothari

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at */

/* A minimally extended progress listener used by download manager
 * to update its default UI.  This is implemented in nsDownloadProgressListener.js.
 * See nsIWebProgressListener for documentation, and use its constants.  This isn't
 * too pretty, but the alternative is having this extend nsIWebProgressListener and
 * adding an |item| attribute, which would mean a separate nsIDownloadProgressListener
 * for every nsIDownloadItem, which is a waste...

#include "nsISupports.idl"

interface nsIWebProgress;
interface nsIRequest;
interface nsIURI;
interface nsIDownload;
interface nsIDOMDocument;

[scriptable, uuid(7acb07ea-cac2-4c15-a3ad-23aaa789ed51)]
interface nsIDownloadProgressListener : nsISupports {

  * document
  * The document of the download manager frontend.
  attribute nsIDOMDocument document;

  * Dispatched whenever the state of the download changes.
  * @param aState The previous download sate.
  * @param aDownload The download object.
  * @see nsIDownloadManager for download states.
  void onDownloadStateChange(in short aState, in nsIDownload aDownload);

  void onStateChange(in nsIWebProgress aWebProgress,
                     in nsIRequest aRequest,
                     in unsigned long aStateFlags,
                     in nsresult aStatus,
                     in nsIDownload aDownload);

  void onProgressChange(in nsIWebProgress aWebProgress,
                        in nsIRequest aRequest,
                        in long long aCurSelfProgress,
                        in long long aMaxSelfProgress,
                        in long long aCurTotalProgress,
                        in long long aMaxTotalProgress,
                        in nsIDownload aDownload);

  void onSecurityChange(in nsIWebProgress aWebProgress,
                        in nsIRequest aRequest,
                        in unsigned long aState,
                        in nsIDownload aDownload);