1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/docshell/base/nsIWebNavigationInfo.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,63 @@ 1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsISupports.idl" 1.10 + 1.11 +interface nsIWebNavigation; 1.12 + 1.13 +/** 1.14 + * The nsIWebNavigationInfo interface exposes a way to get information 1.15 + * on the capabilities of Gecko webnavigation objects. 1.16 + */ 1.17 +[scriptable, uuid(62a93afb-93a1-465c-84c8-0432264229de)] 1.18 +interface nsIWebNavigationInfo : nsISupports 1.19 +{ 1.20 + /** 1.21 + * Returned by isTypeSupported to indicate lack of support for a type. 1.22 + * @note this is guaranteed not to change, so that boolean tests can be done 1.23 + * on the return value if isTypeSupported to detect whether a type is 1.24 + * supported at all. 1.25 + */ 1.26 + const unsigned long UNSUPPORTED = 0; 1.27 + 1.28 + /** 1.29 + * Returned by isTypeSupported to indicate that a type is supported as an 1.30 + * image. 1.31 + */ 1.32 + const unsigned long IMAGE = 1; 1.33 + 1.34 + /** 1.35 + * Returned by isTypeSupported to indicate that a type is supported via an 1.36 + * NPAPI ("Netscape 4 API") plug-in. This is not the value returned for 1.37 + * "XPCOM plug-ins". 1.38 + */ 1.39 + const unsigned long PLUGIN = 2; 1.40 + 1.41 + /** 1.42 + * @note Other return types may be added here in the future as they become 1.43 + * relevant. 1.44 + */ 1.45 + 1.46 + /** 1.47 + * Returned by isTypeSupported to indicate that a type is supported via some 1.48 + * other means. 1.49 + */ 1.50 + const unsigned long OTHER = 1 << 15; 1.51 + 1.52 + /** 1.53 + * Query whether aType is supported. 1.54 + * @param aType the MIME type in question. 1.55 + * @param aWebNav the nsIWebNavigation object for which the request 1.56 + * is being made. This is allowed to be null. If it is non-null, 1.57 + * the return value of this method may depend on the exact state of 1.58 + * aWebNav and the values set through nsIWebBrowserSetup; otherwise 1.59 + * the method will assume that the caller is interested in information 1.60 + * about nsIWebNavigation objects in their default state. 1.61 + * @return an enum value indicating whether and how aType is supported. 1.62 + * @note This method may rescan plugins to ensure that they're properly 1.63 + * registered for the types they support. 1.64 + */ 1.65 + unsigned long isTypeSupported(in ACString aType, in nsIWebNavigation aWebNav); 1.66 +};