Bug 290648 make nsITransfer::init take an nsICancelable, and remove the observer attribute

r=bz sr=darin a=asa
This commit is contained in:
cbiesinger%web.de 2007-08-14 01:12:23 +00:00
Родитель d2b496f55f
Коммит 560e1abf9a
2 изменённых файлов: 16 добавлений и 9 удалений

Просмотреть файл

@ -41,11 +41,11 @@
interface nsIURI;
interface nsILocalFile;
interface nsIObserver;
interface nsIWebBrowserPersist;
interface nsICancelable;
interface nsIWebProgressListener;
interface nsIMIMEInfo;
[scriptable, uuid(4584178b-ebbd-4d5e-91d3-aa676c2291d2)]
[scriptable, uuid(1cb42fb4-f092-4a0e-8930-6c06a524da07)]
interface nsIDownload : nsITransfer {
/**
@ -81,13 +81,10 @@ interface nsIDownload : nsITransfer {
readonly attribute nsIURI target;
/**
* Optional. If set, it will be used for cancellation, and the transfer
* will be set as its listener. If not, |observer| should be set to listen
* and respond accordingly to topics like oncancel, and the client promises
* to set the transfer item as the listener for whatever transfer component
* is being used.
* Object that can be used to cancel the download.
* Will be null after the download is finished.
*/
readonly attribute nsIWebBrowserPersist persist;
readonly attribute nsICancelable cancelable;
/**
* The user-readable description of the transfer.

Просмотреть файл

@ -40,6 +40,7 @@
#include "nsIDownload.idl"
interface nsIDOMWindow;
interface nsIObserver;
/* nsIProgressDialog
*
@ -62,7 +63,7 @@ interface nsIDOMWindow;
* not need to hold a reference to it.
*/
[scriptable, uuid(80183bd3-b9e8-45a6-a2ee-1449bc0d4253)]
[scriptable, uuid(20e790a2-76c6-462d-851a-22ab6cbbe48b)]
interface nsIProgressDialog : nsIDownload {
/**
* Open the dialog
@ -80,6 +81,15 @@ interface nsIProgressDialog : nsIDownload {
*/
attribute PRBool cancelDownloadOnClose;
/**
* Observer for this dialog. If set, receives the following topics:
* oncancel - observer should cancel the transfer
* onpause - observer should suspend the transfer
* onresume - observer should resume the suspended transfer
* For each of those, the subject will be the nsIProgressDialog.
*/
attribute nsIObserver observer;
/**
* The dialog object itself. This might be null if the dialog isn't
* open yet, or has been closed.