freezing interface for 1.0. bug 99618 r=chak,rpotts a=valeski

This commit is contained in:
danm%netscape.com 2002-04-10 21:18:20 +00:00
parent 5059093a01
commit 214f9212ae

View File

@ -14,32 +14,33 @@
* The Initial Developer of the Original Code is Netscape * The Initial Developer of the Original Code is Netscape
* Communications, Inc. Portions created by Netscape are * Communications, Inc. Portions created by Netscape are
* Copyright (C) 2001, Mozilla. All Rights Reserved. * Copyright (C) 2001,2002 Mozilla. All Rights Reserved.
* Contributor(s): * Contributor(s):
*/ */
/* /**
nsIWindowWatcher is the keeper of Gecko/DOM Windows. It maintains * nsIWindowWatcher is the keeper of Gecko/DOM Windows. It maintains
maintains a traversable list of open top-level windows, and allows * a list of open top-level windows, and allows some operations on them.
some operations on them.
Usage notes: * Usage notes:
This component has an |activeWindow| property. Clients may expect * This component has an |activeWindow| property. Clients may expect
this property to be always current, so to properly integrate this component * this property to be always current, so to properly integrate this component
the application will need to keep it current by setting the property * the application will need to keep it current by setting the property
as the active window changes. * as the active window changes.
This component does automatically keep an accurate list of extant * This component should not keep a (XPCOM) reference to any windows;
windows; windows need not be added or removed by hand (and there's no * the implementation will claim no ownership. Windows must notify
interface for doing so). * this component when they are created or destroyed, so only a weak
Windows referenced will not be refcounted; the implementation will * reference is kept. Note that there is no interface for such notifications
claim no ownership. Since it's the nature of this service to always * (not a public one, anyway). This is taken care of both in Mozilla and
hold a ("weak") reference to an open window, this requirement removes * by common embedding code. Embedding clients need do nothing special
a potential reference loop. It should be safe because it's a * about that requirement.
design requirement that clients explicitly maintain |activeWindow|, * This component must be initialized at application startup by calling
and that windows remove themselves from the service when they are closed. * setWindowCreator.
*/ *
* @status FROZEN
*/
#include "nsISupports.idl" #include "nsISupports.idl"