michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * 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: michael@0: interface nsIDOMWindow; michael@0: michael@0: /** michael@0: * nsIWebContentHandlerRegistrar michael@0: * michael@0: * Applications wishing to use web content handlers need to implement this michael@0: * interface. Typically they will prompt the user to confirm adding an entry michael@0: * to the local list. michael@0: * michael@0: * The component must have the contract id defined below so that nsNavigator michael@0: * can invoke it. michael@0: */ michael@0: michael@0: [scriptable, uuid(e6a75410-c93e-42bf-84ca-a5c3ec34a2f1)] michael@0: interface nsIWebContentHandlerRegistrar : nsISupports michael@0: { michael@0: /** michael@0: * See documentation in Navigator.webidl michael@0: * The additional contentWindow param for both methods represents the dom michael@0: * content window from which the method has been called. michael@0: */ michael@0: void registerContentHandler(in DOMString mimeType, michael@0: in DOMString uri, michael@0: in DOMString title, michael@0: in nsIDOMWindow contentWindow); michael@0: void registerProtocolHandler(in DOMString protocol, michael@0: in DOMString uri, michael@0: in DOMString title, michael@0: in nsIDOMWindow contentWindow); michael@0: }; michael@0: michael@0: %{ C++ michael@0: michael@0: #define NS_WEBCONTENTHANDLERREGISTRAR_CONTRACTID "@mozilla.org/embeddor.implemented/web-content-handler-registrar;1" michael@0: %}