Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- |
michael@0 | 2 | * |
michael@0 | 3 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #include "nsISupports.idl" |
michael@0 | 8 | |
michael@0 | 9 | interface nsIDOMWindow; |
michael@0 | 10 | |
michael@0 | 11 | /** |
michael@0 | 12 | * nsIWebContentHandlerRegistrar |
michael@0 | 13 | * |
michael@0 | 14 | * Applications wishing to use web content handlers need to implement this |
michael@0 | 15 | * interface. Typically they will prompt the user to confirm adding an entry |
michael@0 | 16 | * to the local list. |
michael@0 | 17 | * |
michael@0 | 18 | * The component must have the contract id defined below so that nsNavigator |
michael@0 | 19 | * can invoke it. |
michael@0 | 20 | */ |
michael@0 | 21 | |
michael@0 | 22 | [scriptable, uuid(e6a75410-c93e-42bf-84ca-a5c3ec34a2f1)] |
michael@0 | 23 | interface nsIWebContentHandlerRegistrar : nsISupports |
michael@0 | 24 | { |
michael@0 | 25 | /** |
michael@0 | 26 | * See documentation in Navigator.webidl |
michael@0 | 27 | * The additional contentWindow param for both methods represents the dom |
michael@0 | 28 | * content window from which the method has been called. |
michael@0 | 29 | */ |
michael@0 | 30 | void registerContentHandler(in DOMString mimeType, |
michael@0 | 31 | in DOMString uri, |
michael@0 | 32 | in DOMString title, |
michael@0 | 33 | in nsIDOMWindow contentWindow); |
michael@0 | 34 | void registerProtocolHandler(in DOMString protocol, |
michael@0 | 35 | in DOMString uri, |
michael@0 | 36 | in DOMString title, |
michael@0 | 37 | in nsIDOMWindow contentWindow); |
michael@0 | 38 | }; |
michael@0 | 39 | |
michael@0 | 40 | %{ C++ |
michael@0 | 41 | |
michael@0 | 42 | #define NS_WEBCONTENTHANDLERREGISTRAR_CONTRACTID "@mozilla.org/embeddor.implemented/web-content-handler-registrar;1" |
michael@0 | 43 | %} |