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: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | interface nsIWebNavigation; |
michael@0 | 9 | |
michael@0 | 10 | /** |
michael@0 | 11 | * The nsIWebNavigationInfo interface exposes a way to get information |
michael@0 | 12 | * on the capabilities of Gecko webnavigation objects. |
michael@0 | 13 | */ |
michael@0 | 14 | [scriptable, uuid(62a93afb-93a1-465c-84c8-0432264229de)] |
michael@0 | 15 | interface nsIWebNavigationInfo : nsISupports |
michael@0 | 16 | { |
michael@0 | 17 | /** |
michael@0 | 18 | * Returned by isTypeSupported to indicate lack of support for a type. |
michael@0 | 19 | * @note this is guaranteed not to change, so that boolean tests can be done |
michael@0 | 20 | * on the return value if isTypeSupported to detect whether a type is |
michael@0 | 21 | * supported at all. |
michael@0 | 22 | */ |
michael@0 | 23 | const unsigned long UNSUPPORTED = 0; |
michael@0 | 24 | |
michael@0 | 25 | /** |
michael@0 | 26 | * Returned by isTypeSupported to indicate that a type is supported as an |
michael@0 | 27 | * image. |
michael@0 | 28 | */ |
michael@0 | 29 | const unsigned long IMAGE = 1; |
michael@0 | 30 | |
michael@0 | 31 | /** |
michael@0 | 32 | * Returned by isTypeSupported to indicate that a type is supported via an |
michael@0 | 33 | * NPAPI ("Netscape 4 API") plug-in. This is not the value returned for |
michael@0 | 34 | * "XPCOM plug-ins". |
michael@0 | 35 | */ |
michael@0 | 36 | const unsigned long PLUGIN = 2; |
michael@0 | 37 | |
michael@0 | 38 | /** |
michael@0 | 39 | * @note Other return types may be added here in the future as they become |
michael@0 | 40 | * relevant. |
michael@0 | 41 | */ |
michael@0 | 42 | |
michael@0 | 43 | /** |
michael@0 | 44 | * Returned by isTypeSupported to indicate that a type is supported via some |
michael@0 | 45 | * other means. |
michael@0 | 46 | */ |
michael@0 | 47 | const unsigned long OTHER = 1 << 15; |
michael@0 | 48 | |
michael@0 | 49 | /** |
michael@0 | 50 | * Query whether aType is supported. |
michael@0 | 51 | * @param aType the MIME type in question. |
michael@0 | 52 | * @param aWebNav the nsIWebNavigation object for which the request |
michael@0 | 53 | * is being made. This is allowed to be null. If it is non-null, |
michael@0 | 54 | * the return value of this method may depend on the exact state of |
michael@0 | 55 | * aWebNav and the values set through nsIWebBrowserSetup; otherwise |
michael@0 | 56 | * the method will assume that the caller is interested in information |
michael@0 | 57 | * about nsIWebNavigation objects in their default state. |
michael@0 | 58 | * @return an enum value indicating whether and how aType is supported. |
michael@0 | 59 | * @note This method may rescan plugins to ensure that they're properly |
michael@0 | 60 | * registered for the types they support. |
michael@0 | 61 | */ |
michael@0 | 62 | unsigned long isTypeSupported(in ACString aType, in nsIWebNavigation aWebNav); |
michael@0 | 63 | }; |