Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
michael@0 | 2 | * |
michael@0 | 3 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | /** |
michael@0 | 8 | * nsIWindowCreator2 is an extension of nsIWindowCreator which allows |
michael@0 | 9 | * additional information about the context of the window creation to |
michael@0 | 10 | * be passed. |
michael@0 | 11 | * |
michael@0 | 12 | * @see nsIWindowCreator |
michael@0 | 13 | * @see nsIWindowWatcher |
michael@0 | 14 | * |
michael@0 | 15 | * @status |
michael@0 | 16 | */ |
michael@0 | 17 | |
michael@0 | 18 | #include "nsIWindowCreator.idl" |
michael@0 | 19 | |
michael@0 | 20 | interface nsIURI; |
michael@0 | 21 | interface nsIWebBrowserChrome; |
michael@0 | 22 | |
michael@0 | 23 | [scriptable, uuid(f673ec81-a4b0-11d6-964b-eb5a2bf216fc)] |
michael@0 | 24 | |
michael@0 | 25 | interface nsIWindowCreator2 : nsIWindowCreator { |
michael@0 | 26 | |
michael@0 | 27 | /** |
michael@0 | 28 | * Definitions for contextFlags |
michael@0 | 29 | */ |
michael@0 | 30 | |
michael@0 | 31 | // Likely that the window is an advertising popup. |
michael@0 | 32 | const unsigned long PARENT_IS_LOADING_OR_RUNNING_TIMEOUT = 0x00000001; |
michael@0 | 33 | |
michael@0 | 34 | /** Create a new window. Gecko will/may call this method, if made |
michael@0 | 35 | available to it, to create new windows. |
michael@0 | 36 | @param parent Parent window, if any. Null if not. The newly created |
michael@0 | 37 | window should be made a child/dependent window of |
michael@0 | 38 | the parent, if any (and if the concept applies |
michael@0 | 39 | to the underlying OS). |
michael@0 | 40 | @param chromeFlags Chrome features from nsIWebBrowserChrome |
michael@0 | 41 | @param contextFlags Flags about the context of the window being created. |
michael@0 | 42 | @param uri The URL for which this window is intended. It can be null |
michael@0 | 43 | or zero-length. The implementation of this interface |
michael@0 | 44 | may use the URL to help determine what sort of window |
michael@0 | 45 | to open or whether to cancel window creation. It will not |
michael@0 | 46 | load the URL. |
michael@0 | 47 | @param cancel Return |true| to reject window creation. If true the |
michael@0 | 48 | implementation has determined the window should not |
michael@0 | 49 | be created at all. The caller should not default |
michael@0 | 50 | to any possible backup scheme for creating the window. |
michael@0 | 51 | @return the new window. Will be null if canceled or an error occurred. |
michael@0 | 52 | */ |
michael@0 | 53 | nsIWebBrowserChrome createChromeWindow2(in nsIWebBrowserChrome parent, |
michael@0 | 54 | in uint32_t chromeFlags, |
michael@0 | 55 | in uint32_t contextFlags, |
michael@0 | 56 | in nsIURI uri, |
michael@0 | 57 | out boolean cancel); |
michael@0 | 58 | }; |