Bug 1845134 - Part 4: Update existing ui-icons to use the latest source from acorn...
[gecko.git] / netwerk / base / nsIParentRedirectingChannel.idl
blob6302775c51c94203d3b03879b03b3a5f2f93281b
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 "nsIParentChannel.idl"
7 interface nsIRemoteTab;
8 interface nsIChannel;
9 interface nsIAsyncVerifyRedirectCallback;
11 [uuid(01987690-48cf-45de-bae3-e143c2adc2a8)]
12 interface nsIAsyncVerifyRedirectReadyCallback : nsISupports
14 /**
15 * Asynchronous callback when redirected channel finishes the preparation for
16 * completing the verification procedure.
18 * @param result
19 * SUCCEEDED if preparation for redirection verification succceed.
20 * If FAILED the redirection must be aborted.
22 void readyToVerify(in nsresult result);
25 /**
26 * Implemented by chrome side of IPC protocols that support redirect responses.
29 [scriptable, uuid(3ed1d288-5324-46ee-8a98-33ac37d1080b)]
30 interface nsIParentRedirectingChannel : nsIParentChannel
32 /**
33 * Called when the channel got a response that redirects it to a different
34 * URI. The implementation is responsible for calling the redirect observers
35 * on the child process and provide the decision result to the callback.
37 * @param newURI
38 * the URI we redirect to
39 * @param callback
40 * redirect result callback, usage is compatible with how
41 * nsIChannelEventSink defines it
43 void startRedirect(in nsIChannel newChannel,
44 in uint32_t redirectFlags,
45 in nsIAsyncVerifyRedirectCallback callback);
47 /**
48 * Called to new channel when the original channel got Redirect2Verify
49 * response from child. Callback will be invoked when the new channel
50 * finishes the preparation for Redirect2Verify and can be called immediately.
52 * @param callback
53 * redirect ready callback, will be called when redirect verification
54 * procedure can proceed.
56 void continueVerification(in nsIAsyncVerifyRedirectReadyCallback callback);
58 /**
59 * Called after we are done with redirecting process and we know if to
60 * redirect or not. Forward the redirect result to the child process. From
61 * that moment the nsIParentChannel implementation expects it will be
62 * forwarded all notifications from the 'real' channel.
64 * Primarilly used by HttpChannelParent::OnRedirectResult and kept as
65 * mActiveChannel and mRedirectChannel in that class.
67 void completeRedirect(in nsresult succeeded);