Bug 1751497 - adjust wpt test-verify and test-coverage tasks to be fission only....
[gecko.git] / docshell / base / nsILoadURIDelegate.idl
blob512535cee5e052c01c511fba8075b55a18df272f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /*
7 */
9 #include "nsISupports.idl"
11 interface nsIURI;
12 interface nsIPrincipal;
14 /**
15 * The nsILoadURIDelegate interface.
16 * Used for delegating URI loads to GeckoView's application, e.g., Custom Tabs
17 * or Progressive Web Apps.
19 [scriptable, uuid(78e42d37-a34c-4d96-b901-25385669aba4)]
20 interface nsILoadURIDelegate : nsISupports
22 /**
23 * Delegates the URI load. This should only be called for top-level loads.
25 * @param aURI The URI to load.
26 * @param aWhere See possible values described in nsIBrowserDOMWindow.
27 * @param aFlags Flags which control the behavior of the load.
28 * @param aTriggeringPrincipal The principal that triggered the load of aURI.
30 * Returns whether the load has been successfully handled.
32 boolean
33 loadURI(in nsIURI aURI, in short aWhere, in long aFlags,
34 in nsIPrincipal aTriggeringPrincipal);
36 /**
37 * Delegates page load error handling. This may be called for either top-level
38 * loads or subframes.
40 * @param aURI The URI that failed to load.
41 * @param aError The error code.
42 * @param aErrorModule The error module code.
44 * Returns an error page URL to load, or null to show the default error page.
45 * No error page is shown at all if an error is thrown.
47 nsIURI
48 handleLoadError(in nsIURI aURI, in nsresult aError, in short aErrorModule);