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 nsIHandlerInfo; michael@0: interface nsIHelperAppLauncher; michael@0: interface nsIURI; michael@0: interface nsIInterfaceRequestor; michael@0: michael@0: /** michael@0: * This is used to ask a user what they would like to do with a given piece of michael@0: * content. michael@0: */ michael@0: [scriptable, uuid(456ca3b2-02be-4f97-89a2-08c08d3ad88f)] michael@0: interface nsIContentDispatchChooser : nsISupports { michael@0: /** michael@0: * This request is passed to the helper app dialog because Gecko can not michael@0: * handle content of this type. michael@0: */ michael@0: const unsigned long REASON_CANNOT_HANDLE = 0; michael@0: michael@0: /** michael@0: * Asks the user what to do with the content. michael@0: * michael@0: * @param aHander michael@0: * The interface describing the details of how this content should or michael@0: * can be handled. michael@0: * @param aWindowContext michael@0: * The parent window context to show this chooser. This can be null, michael@0: * and some implementations may not care about it. Generally, you'll michael@0: * want to pass an nsIDOMWindow in so the chooser can be properly michael@0: * parented when opened. michael@0: * @param aURI michael@0: * The URI of the resource that we are asking about. michael@0: * @param aReason michael@0: * The reason why we are asking (see above). michael@0: */ michael@0: void ask(in nsIHandlerInfo aHandler, michael@0: in nsIInterfaceRequestor aWindowContext, michael@0: in nsIURI aURI, michael@0: in unsigned long aReason); michael@0: }; michael@0: