2002-08-02 18:51:24 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 15:12:37 +04:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
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"
|
|
|
|
|
2014-06-06 06:51:14 +04:00
|
|
|
interface nsITabParent;
|
2003-04-09 00:47:18 +04:00
|
|
|
interface nsIURI;
|
2002-08-02 18:51:24 +04:00
|
|
|
interface nsIWebBrowserChrome;
|
|
|
|
|
2015-04-29 12:25:26 +03:00
|
|
|
[scriptable, uuid(b6c44689-f97e-4f32-a723-29eeddfbdc53)]
|
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.
|
2014-06-06 06:51:14 +04:00
|
|
|
@param aOpeningTab The TabParent that is trying to open this new chrome
|
|
|
|
window. Can be nullptr.
|
2003-04-09 00:47:18 +04:00
|
|
|
@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,
|
2012-08-22 19:56:38 +04:00
|
|
|
in uint32_t chromeFlags,
|
|
|
|
in uint32_t contextFlags,
|
2014-06-06 06:51:14 +04:00
|
|
|
in nsITabParent aOpeningTab,
|
2003-04-09 00:47:18 +04:00
|
|
|
out boolean cancel);
|
2015-04-29 12:25:26 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* B2G multi-screen support. When open another top-level window on b2g,
|
|
|
|
* a screen ID is needed for identifying which screen this window is
|
|
|
|
* opened to.
|
|
|
|
* @param aScreenId Differentiate screens of windows. It is platform-
|
|
|
|
* specific due to the hardware limitation for now.
|
|
|
|
*/
|
|
|
|
[noscript]
|
|
|
|
void setScreenId(in uint32_t aScreenId);
|
2002-08-02 18:51:24 +04:00
|
|
|
};
|