2002-08-02 18:51:24 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla Public
|
|
|
|
* License Version 1.1 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.mozilla.org/MPL/
|
|
|
|
|
|
|
|
* Software distributed under the License is distributed on an "AS
|
|
|
|
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
|
|
* implied. See the License for the specific language governing
|
|
|
|
* rights and limitations under the License.
|
|
|
|
|
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
|
|
|
* Communications, Inc. Portions created by Netscape are
|
|
|
|
* Copyright (C) 2001,2002 Mozilla. All Rights Reserved.
|
|
|
|
|
|
|
|
* Contributor(s):
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* nsIWindowCreator2 is an extension of nsIWindowCreator which allows
|
|
|
|
* additional information about the context of the window creation to
|
|
|
|
* be passed.
|
|
|
|
*
|
|
|
|
* @see nsIWindowCreator
|
|
|
|
* @see nsIWindowWatcher
|
|
|
|
*
|
|
|
|
* @status
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "nsIWindowCreator.idl"
|
|
|
|
|
2003-04-09 00:47:18 +04:00
|
|
|
interface nsIURI;
|
2002-08-02 18:51:24 +04:00
|
|
|
interface nsIWebBrowserChrome;
|
|
|
|
|
2002-09-28 03:23:01 +04:00
|
|
|
// This interface is not generally scriptable: only the const(s)
|
|
|
|
// should be visible.
|
|
|
|
[scriptable, uuid(f673ec81-a4b0-11d6-964b-eb5a2bf216fc)]
|
2002-08-02 18:51:24 +04:00
|
|
|
|
|
|
|
interface nsIWindowCreator2 : nsIWindowCreator {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Definitions for contextFlags
|
|
|
|
*/
|
2002-09-28 03:23:01 +04:00
|
|
|
|
2002-08-02 18:51:24 +04:00
|
|
|
// Likely that the window is an advertising popup.
|
|
|
|
const unsigned long PARENT_IS_LOADING_OR_RUNNING_TIMEOUT = 0x00000001;
|
2002-09-28 03:23:01 +04:00
|
|
|
|
2002-08-02 18:51:24 +04:00
|
|
|
/** Create a new window. Gecko will/may call this method, if made
|
|
|
|
available to it, to create new windows.
|
2003-04-09 00:47:18 +04:00
|
|
|
@param parent Parent window, if any. Null if not. The newly created
|
2002-08-02 18:51:24 +04:00
|
|
|
window should be made a child/dependent window of
|
|
|
|
the parent, if any (and if the concept applies
|
|
|
|
to the underlying OS).
|
2003-04-09 00:47:18 +04:00
|
|
|
@param chromeFlags Chrome features from nsIWebBrowserChrome
|
|
|
|
@param contextFlags Flags about the context of the window being created.
|
|
|
|
@param uri The URL for which this window is intended. It can be null
|
|
|
|
or zero-length. The implementation of this interface
|
|
|
|
may use the URL to help determine what sort of window
|
|
|
|
to open or whether to cancel window creation. It will not
|
|
|
|
load the URL.
|
|
|
|
@param cancel Return |true| to reject window creation. If true the
|
|
|
|
implementation has determined the window should not
|
|
|
|
be created at all. The caller should not default
|
|
|
|
to any possible backup scheme for creating the window.
|
|
|
|
@return the new window. Will be null if canceled or an error occurred.
|
2002-08-02 18:51:24 +04:00
|
|
|
*/
|
2002-09-28 03:23:01 +04:00
|
|
|
[noscript]
|
2002-08-02 18:51:24 +04:00
|
|
|
nsIWebBrowserChrome createChromeWindow2(in nsIWebBrowserChrome parent,
|
|
|
|
in PRUint32 chromeFlags,
|
2003-04-09 00:47:18 +04:00
|
|
|
in PRUint32 contextFlags,
|
|
|
|
in nsIURI uri,
|
|
|
|
out boolean cancel);
|
2002-08-02 18:51:24 +04:00
|
|
|
};
|