1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/interfaces/sidebar/nsIWebContentHandlerRegistrar.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,43 @@ 1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- 1.5 + * 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#include "nsISupports.idl" 1.11 + 1.12 +interface nsIDOMWindow; 1.13 + 1.14 +/** 1.15 + * nsIWebContentHandlerRegistrar 1.16 + * 1.17 + * Applications wishing to use web content handlers need to implement this 1.18 + * interface. Typically they will prompt the user to confirm adding an entry 1.19 + * to the local list. 1.20 + * 1.21 + * The component must have the contract id defined below so that nsNavigator 1.22 + * can invoke it. 1.23 + */ 1.24 + 1.25 +[scriptable, uuid(e6a75410-c93e-42bf-84ca-a5c3ec34a2f1)] 1.26 +interface nsIWebContentHandlerRegistrar : nsISupports 1.27 +{ 1.28 + /** 1.29 + * See documentation in Navigator.webidl 1.30 + * The additional contentWindow param for both methods represents the dom 1.31 + * content window from which the method has been called. 1.32 + */ 1.33 + void registerContentHandler(in DOMString mimeType, 1.34 + in DOMString uri, 1.35 + in DOMString title, 1.36 + in nsIDOMWindow contentWindow); 1.37 + void registerProtocolHandler(in DOMString protocol, 1.38 + in DOMString uri, 1.39 + in DOMString title, 1.40 + in nsIDOMWindow contentWindow); 1.41 +}; 1.42 + 1.43 +%{ C++ 1.44 + 1.45 +#define NS_WEBCONTENTHANDLERREGISTRAR_CONTRACTID "@mozilla.org/embeddor.implemented/web-content-handler-registrar;1" 1.46 +%}