Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIWindowProvider Interface Reference

The nsIWindowProvider interface exists so that the window watcher's default behavior of opening a new window can be easly modified. More...

import "nsIWindowProvider.idl";

Inheritance diagram for nsIWindowProvider:
Inheritance graph
[legend]
Collaboration diagram for nsIWindowProvider:
Collaboration graph
[legend]

List of all members.

Public Member Functions

nsIDOMWindow provideWindow (in nsIDOMWindow aParent, in unsigned long aChromeFlags, in boolean aPositionSpecified, in boolean aSizeSpecified, in nsIURI aURI, in AString aName, in AUTF8String aFeatures, out boolean aWindowIsNew)
 A method to request that this provider provide a window.

Detailed Description

The nsIWindowProvider interface exists so that the window watcher's default behavior of opening a new window can be easly modified.

When the window watcher needs to open a new window, it will first check with the nsIWindowProvider it gets from the parent window. If there is no provider or the provider does not provide a window, the window watcher will proceed to actually open a new window.

Definition at line 62 of file nsIWindowProvider.idl.


Member Function Documentation

nsIDOMWindow nsIWindowProvider::provideWindow ( in nsIDOMWindow  aParent,
in unsigned long  aChromeFlags,
in boolean  aPositionSpecified,
in boolean  aSizeSpecified,
in nsIURI  aURI,
in AString  aName,
in AUTF8String  aFeatures,
out boolean  aWindowIsNew 
)

A method to request that this provider provide a window.

The window returned need not to have the right name or parent set on it; setting those is the caller's responsibility. The provider can always return null to have the caller create a brand-new window.

Parameters:
aParentMust not be null. This is the window that the caller wants to use as the parent for the new window. Generally, nsIWindowProvider implementors can expect to be somehow related to aParent; the relationship may depend on the nsIWindowProvider implementation.
aChromeFlagsThe chrome flags the caller will use to create a new window if this provider returns null. See nsIWebBrowserChrome for the possible values of this field.
aPositionSpecifiedWhether the attempt to create a window is trying to specify a position for the new window.
aSizeSpecifiedWhether the attempt to create a window is trying to specify a size for the new window.
aURIThe URI to be loaded in the new window. The nsIWindowProvider implementation MUST NOT load this URI in the window it returns. This URI is provided solely to help the nsIWindowProvider implenentation make decisions; the caller will handle loading the URI in the window returned if provideWindow returns a window. Note that the URI may be null if the load cannot be represented by a single URI (e.g. if the load has extra load flags, POST data, etc).
aNameThe name of the window being opened. Setting the name on the return value of provideWindow will be handled by the caller; aName is provided solely to help the nsIWindowProvider implementation make decisions.
aFeaturesThe feature string for the window being opened. This may be empty. The nsIWindowProvider implementation is allowed to apply the feature string to the window it returns in any way it sees fit. See the nsIWindowWatcher interface for details on feature strings.
aWindowIsNew[out] Whether the window being returned was just created by the window provider implementation. This can be used by callers to keep track of which windows were opened by the user as opposed to being opened programmatically. This should be set to false if the window being returned existed before the provideWindow() call. The value of this out parameter is meaningless if provideWindow() returns null.
Returns:
A window the caller should use or null if the caller should just create a new window. The returned window may be newly opened by the nsIWindowProvider implementation or may be a window that already existed.
See also:
nsIWindowWatcher for more information on aFeatures.
nsIWebBrowserChrome for more information on aChromeFlags.

The documentation for this interface was generated from the following file: