Bug 1882120 [wpt PR 44789] - Update wpt metadata, a=testonly
[gecko.git] / uriloader / base / nsIContentHandler.idl
blob31ef87a8ba421f99cbd8d3b864330d7de21fd14e
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
7 interface nsIRequest;
8 interface nsIInterfaceRequestor;
10 [scriptable, uuid(49439df2-b3d2-441c-bf62-866bdaf56fd2)]
11 interface nsIContentHandler : nsISupports
13 /**
14 * Tells the content handler to take over handling the content. If this
15 * function succeeds, the URI Loader will leave this request alone, ignoring
16 * progress notifications. Failure of this method will cause the request to be
17 * cancelled, unless the error code is NS_ERROR_WONT_HANDLE_CONTENT (see
18 * below).
20 * @param aWindowContext
21 * Window context, used to get things like the current nsIDOMWindow
22 * for this request. May be null.
23 * @param aContentType
24 * The content type of aRequest
25 * @param aRequest
26 * A request whose content type is already known.
28 * @throw NS_ERROR_WONT_HANDLE_CONTENT Indicates that this handler does not
29 * want to handle this content. A different way for handling this
30 * content should be tried.
32 void handleContent(in string aContentType,
33 in nsIInterfaceRequestor aWindowContext,
34 in nsIRequest aRequest);