Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /* A minimally extended progress listener used by download manager
7 * to update its default UI. This is implemented in nsDownloadProgressListener.js.
8 * See nsIWebProgressListener for documentation, and use its constants. This isn't
9 * too pretty, but the alternative is having this extend nsIWebProgressListener and
10 * adding an |item| attribute, which would mean a separate nsIDownloadProgressListener
11 * for every nsIDownloadItem, which is a waste...
12 */
14 #include "nsISupports.idl"
16 interface nsIWebProgress;
17 interface nsIRequest;
18 interface nsIURI;
19 interface nsIDownload;
20 interface nsIDOMDocument;
22 [scriptable, uuid(7acb07ea-cac2-4c15-a3ad-23aaa789ed51)]
23 interface nsIDownloadProgressListener : nsISupports {
25 /**
26 * document
27 * The document of the download manager frontend.
28 */
30 attribute nsIDOMDocument document;
32 /**
33 * Dispatched whenever the state of the download changes.
34 *
35 * @param aState The previous download sate.
36 * @param aDownload The download object.
37 * @see nsIDownloadManager for download states.
38 */
39 void onDownloadStateChange(in short aState, in nsIDownload aDownload);
41 void onStateChange(in nsIWebProgress aWebProgress,
42 in nsIRequest aRequest,
43 in unsigned long aStateFlags,
44 in nsresult aStatus,
45 in nsIDownload aDownload);
47 void onProgressChange(in nsIWebProgress aWebProgress,
48 in nsIRequest aRequest,
49 in long long aCurSelfProgress,
50 in long long aMaxSelfProgress,
51 in long long aCurTotalProgress,
52 in long long aMaxTotalProgress,
53 in nsIDownload aDownload);
55 void onSecurityChange(in nsIWebProgress aWebProgress,
56 in nsIRequest aRequest,
57 in unsigned long aState,
58 in nsIDownload aDownload);
60 };