||Implement the nsISupports methods...
||Create a window, which will be initially invisible.
@param aParent the parent window. Can be null.
@param aUrl the contents of the new window.
@param aChromeMask chrome flags affecting the kind of OS border
given to the window. see nsIBrowserWindow for
@param aCallbacks interface providing C++ hooks for window initialization
before the window is made visible. Can be null.
@param aInitialWidth width, in pixels, of the window. Width of window
at creation. Can be overridden by the "width"
tag in the XUL. Set to NS_SIZETOCONTENT to force
the window to wrap to its contents.
@param aInitialHeight like aInitialWidth, but subtly different.
@param aOpeningTab The RemoteTab that requested that this window be opened.
Can be left null.
@param aOpenerWindow The Window Proxy which requested that this window be opened.
Can be left null.
||This interface represents a nsIWebBrowser instance with no associated OS
window. Its main function is to manage the lifetimes of those windows.
A strong reference to this object must be held until the window is
ready to be destroyed.
||Return an enumerator which iterates over all windows of type aWindowType
from the oldest window to the youngest.
@param aWindowType the returned enumerator will enumerate only
windows of this type. ("type" is the
|windowtype| attribute of the XML <window> element.)
If null, all windows will be enumerated.
@return an enumerator of nsIDOMWindows. Note that windows close
asynchronously in many cases, so windows returned from this
enumerator can have .closed set to true. Caveat enumerator!
||The nsIXULBrowserWindow supplies the methods that may be called from the
internals of the browser area to tell the containing xul window to update
When the window is destroyed, it will fire a "xul-window-destroyed"
notification through the global observer service.
||This next bit is troublesome. We carry two different versions of a pointer
to our parent window. One is the parent window's widget, which is passed
to our own widget. The other is a weak reference we keep here to our
parent WebShellWindow. The former is useful to the widget, and we can't
trust its treatment of the parent reference because they're platform-
specific. The latter is useful to this class.
A better implementation would be one in which the parent keeps strong
references to its children and closes them before it allows itself
to be closed. This would mimic the behaviour of OSes that support
top-level child windows in OSes that do not. Later.