2002-08-02 18:51:24 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2004-04-19 02:01:16 +04:00
|
|
|
* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
2002-08-02 18:51:24 +04:00
|
|
|
* The Original Code is mozilla.org code.
|
2004-04-19 02:01:16 +04:00
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications, Inc.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 2001
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
2002-08-02 18:51:24 +04:00
|
|
|
* Contributor(s):
|
2004-04-19 02:01:16 +04:00
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
2002-08-02 18:51:24 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|
|
|
[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
|
|
|
*/
|
|
|
|
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
|
|
|
};
|