1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include
"nsISupports.idl"
7 interface nsIHandlerInfo
;
8 interface nsIPrincipal
;
10 webidl BrowsingContext
;
13 * This is used to ask a user what they would like to do with a given piece of
16 [scriptable
, uuid(456ca3b2
-02be
-4f97
-89a2
-08c08d3ad88f
)]
17 interface nsIContentDispatchChooser
: nsISupports
{
19 * Opens the handler associated with the given resource.
20 * If the caller does not have permission or no handler is set, we ask the
21 * user to grant permission and pick a handler.
24 * The interface describing the details of how this content should or
27 * The URI of the resource that we are asking about.
28 * @param aTriggeringPrincipal
29 * The principal making the request.
30 * @param aBrowsingContext
31 * The browsing context where the load should happen.
32 * @param aWasTriggeredExternally
33 * True if the load was tripped by an external app.
35 void handleURI
(in nsIHandlerInfo aHandler
,
37 in nsIPrincipal aTriggeringPrincipal
,
38 in BrowsingContext aBrowsingContext
,
39 [optional] in bool aWasTriggeredExternally
);