docshell/base/nsIWebNavigationInfo.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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 };

mercurial