1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/embedding/base/nsIWindowCreator2.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,58 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +/** 1.11 + * nsIWindowCreator2 is an extension of nsIWindowCreator which allows 1.12 + * additional information about the context of the window creation to 1.13 + * be passed. 1.14 + * 1.15 + * @see nsIWindowCreator 1.16 + * @see nsIWindowWatcher 1.17 + * 1.18 + * @status 1.19 + */ 1.20 + 1.21 +#include "nsIWindowCreator.idl" 1.22 + 1.23 +interface nsIURI; 1.24 +interface nsIWebBrowserChrome; 1.25 + 1.26 +[scriptable, uuid(f673ec81-a4b0-11d6-964b-eb5a2bf216fc)] 1.27 + 1.28 +interface nsIWindowCreator2 : nsIWindowCreator { 1.29 + 1.30 + /** 1.31 + * Definitions for contextFlags 1.32 + */ 1.33 + 1.34 + // Likely that the window is an advertising popup. 1.35 + const unsigned long PARENT_IS_LOADING_OR_RUNNING_TIMEOUT = 0x00000001; 1.36 + 1.37 + /** Create a new window. Gecko will/may call this method, if made 1.38 + available to it, to create new windows. 1.39 + @param parent Parent window, if any. Null if not. The newly created 1.40 + window should be made a child/dependent window of 1.41 + the parent, if any (and if the concept applies 1.42 + to the underlying OS). 1.43 + @param chromeFlags Chrome features from nsIWebBrowserChrome 1.44 + @param contextFlags Flags about the context of the window being created. 1.45 + @param uri The URL for which this window is intended. It can be null 1.46 + or zero-length. The implementation of this interface 1.47 + may use the URL to help determine what sort of window 1.48 + to open or whether to cancel window creation. It will not 1.49 + load the URL. 1.50 + @param cancel Return |true| to reject window creation. If true the 1.51 + implementation has determined the window should not 1.52 + be created at all. The caller should not default 1.53 + to any possible backup scheme for creating the window. 1.54 + @return the new window. Will be null if canceled or an error occurred. 1.55 + */ 1.56 + nsIWebBrowserChrome createChromeWindow2(in nsIWebBrowserChrome parent, 1.57 + in uint32_t chromeFlags, 1.58 + in uint32_t contextFlags, 1.59 + in nsIURI uri, 1.60 + out boolean cancel); 1.61 +};