1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include
"nsISupports.idl"
9 interface nsIDOMWindow
;
12 * nsIWebContentHandlerRegistrar
14 * Applications wishing to use web content handlers need to implement this
15 * interface. Typically they will prompt the user to confirm adding an entry
18 * The component must have the contract id defined below so that nsNavigator
22 [scriptable
, uuid(e6a75410
-c93e
-42bf
-84ca
-a5c3ec34a2f1
)]
23 interface nsIWebContentHandlerRegistrar
: nsISupports
26 * See documentation in Navigator.webidl
27 * The additional contentWindow param for both methods represents the dom
28 * content window from which the method has been called.
30 void registerContentHandler
(in DOMString mimeType
,
33 in nsIDOMWindow contentWindow
);
34 void registerProtocolHandler
(in DOMString protocol
,
37 in nsIDOMWindow contentWindow
);
42 #define NS_WEBCONTENTHANDLERREGISTRAR_CONTRACTID
"@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"