1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/uriloader/exthandler/nsIContentDispatchChooser.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,45 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#include "nsISupports.idl" 1.9 + 1.10 +interface nsIHandlerInfo; 1.11 +interface nsIHelperAppLauncher; 1.12 +interface nsIURI; 1.13 +interface nsIInterfaceRequestor; 1.14 + 1.15 +/** 1.16 + * This is used to ask a user what they would like to do with a given piece of 1.17 + * content. 1.18 + */ 1.19 +[scriptable, uuid(456ca3b2-02be-4f97-89a2-08c08d3ad88f)] 1.20 +interface nsIContentDispatchChooser : nsISupports { 1.21 + /** 1.22 + * This request is passed to the helper app dialog because Gecko can not 1.23 + * handle content of this type. 1.24 + */ 1.25 + const unsigned long REASON_CANNOT_HANDLE = 0; 1.26 + 1.27 + /** 1.28 + * Asks the user what to do with the content. 1.29 + * 1.30 + * @param aHander 1.31 + * The interface describing the details of how this content should or 1.32 + * can be handled. 1.33 + * @param aWindowContext 1.34 + * The parent window context to show this chooser. This can be null, 1.35 + * and some implementations may not care about it. Generally, you'll 1.36 + * want to pass an nsIDOMWindow in so the chooser can be properly 1.37 + * parented when opened. 1.38 + * @param aURI 1.39 + * The URI of the resource that we are asking about. 1.40 + * @param aReason 1.41 + * The reason why we are asking (see above). 1.42 + */ 1.43 + void ask(in nsIHandlerInfo aHandler, 1.44 + in nsIInterfaceRequestor aWindowContext, 1.45 + in nsIURI aURI, 1.46 + in unsigned long aReason); 1.47 +}; 1.48 +