nsIWebProtocolHandlerRegistrar.idl (1799B)
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 * 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/. */ 6 7 #include "nsISupports.idl" 8 9 interface nsIURI; 10 11 /** 12 * nsIWebProtocolHandlerRegistrar 13 * 14 * Applications wishing to use web protocol handlers need to implement this 15 * interface. Typically they will prompt the user to confirm adding an entry 16 * to the local list. 17 * 18 * The component must have the contract id defined below so that the Navigator 19 * implementation can invoke it. 20 */ 21 22 [scriptable, uuid(1ce9ef8d-f462-49ca-b8e9-c946c4f37d6e)] 23 interface nsIWebProtocolHandlerRegistrar : nsISupports 24 { 25 /** 26 * See documentation in Navigator.webidl 27 * The additional contentWindow param for this method represents the dom 28 * content window from which the method has been called, or its browser window. 29 */ 30 void registerProtocolHandler(in AString protocol, 31 in nsIURI uri, 32 in AString title, 33 in nsIURI documentURI, 34 in nsISupports windowOrBrowser); 35 /** 36 * Removes a registered protocol handler 37 * 38 * While registerProtocolHandler is exposed on Navigator, unregistering 39 * is exposed through the UI code. 40 * @param protocol 41 * The protocol scheme to remove a service handler for 42 * @param uri 43 * The uri of the service handler to remove 44 */ 45 void removeProtocolHandler(in AString protocol, in AString uri); 46 }; 47 48 %{ C++ 49 50 #define NS_WEBPROTOCOLHANDLERREGISTRAR_CONTRACTID "@mozilla.org/embeddor.implemented/web-protocol-handler-registrar;1" 51 %}