michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: interface nsIRequest; michael@0: interface nsIInterfaceRequestor; michael@0: michael@0: [scriptable, uuid(49439df2-b3d2-441c-bf62-866bdaf56fd2)] michael@0: interface nsIContentHandler : nsISupports michael@0: { michael@0: /** michael@0: * Tells the content handler to take over handling the content. If this michael@0: * function succeeds, the URI Loader will leave this request alone, ignoring michael@0: * progress notifications. Failure of this method will cause the request to be michael@0: * cancelled, unless the error code is NS_ERROR_WONT_HANDLE_CONTENT (see michael@0: * below). michael@0: * michael@0: * @param aWindowContext michael@0: * Window context, used to get things like the current nsIDOMWindow michael@0: * for this request. May be null. michael@0: * @param aContentType michael@0: * The content type of aRequest michael@0: * @param aRequest michael@0: * A request whose content type is already known. michael@0: * michael@0: * @throw NS_ERROR_WONT_HANDLE_CONTENT Indicates that this handler does not michael@0: * want to handle this content. A different way for handling this michael@0: * content should be tried. michael@0: */ michael@0: void handleContent(in string aContentType, michael@0: in nsIInterfaceRequestor aWindowContext, michael@0: in nsIRequest aRequest); michael@0: };