1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/uriloader/base/nsIContentHandler.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,35 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 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 +interface nsIRequest; 1.11 +interface nsIInterfaceRequestor; 1.12 + 1.13 +[scriptable, uuid(49439df2-b3d2-441c-bf62-866bdaf56fd2)] 1.14 +interface nsIContentHandler : nsISupports 1.15 +{ 1.16 + /** 1.17 + * Tells the content handler to take over handling the content. If this 1.18 + * function succeeds, the URI Loader will leave this request alone, ignoring 1.19 + * progress notifications. Failure of this method will cause the request to be 1.20 + * cancelled, unless the error code is NS_ERROR_WONT_HANDLE_CONTENT (see 1.21 + * below). 1.22 + * 1.23 + * @param aWindowContext 1.24 + * Window context, used to get things like the current nsIDOMWindow 1.25 + * for this request. May be null. 1.26 + * @param aContentType 1.27 + * The content type of aRequest 1.28 + * @param aRequest 1.29 + * A request whose content type is already known. 1.30 + * 1.31 + * @throw NS_ERROR_WONT_HANDLE_CONTENT Indicates that this handler does not 1.32 + * want to handle this content. A different way for handling this 1.33 + * content should be tried. 1.34 + */ 1.35 + void handleContent(in string aContentType, 1.36 + in nsIInterfaceRequestor aWindowContext, 1.37 + in nsIRequest aRequest); 1.38 +};