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"
8 interface nsIInterfaceRequestor
;
10 [scriptable
, uuid(49439df2
-b3d2
-441c
-bf62
-866bdaf56fd2
)]
11 interface nsIContentHandler
: nsISupports
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
20 * @param aWindowContext
21 * Window context, used to get things like the current nsIDOMWindow
22 * for this request. May be null.
24 * The content type of 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
);