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
;
9 interface nsIAsyncVerifyRedirectCallback
;
11 [builtinclass
, uuid(01987690-48cf
-45de
-bae3
-e143c2adc2a8
)]
12 interface nsIAsyncVerifyRedirectReadyCallback
: nsISupports
15 * Asynchronous callback when redirected channel finishes the preparation for
16 * completing the verification procedure.
19 * SUCCEEDED if preparation for redirection verification succceed.
20 * If FAILED the redirection must be aborted.
22 void readyToVerify
(in nsresult result
);
26 * Implemented by chrome side of IPC protocols that support redirect responses.
29 [scriptable
, uuid(3ed1d288
-5324-46ee
-8a98
-33ac37d1080b
)]
30 interface nsIParentRedirectingChannel
: nsIParentChannel
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.
38 * the URI we redirect to
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);
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.
53 * redirect ready callback, will be called when redirect verification
54 * procedure can proceed.
56 void continueVerification
(in nsIAsyncVerifyRedirectReadyCallback
callback);
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 ParentChannelListener::OnRedirectResult and kept as
65 * mActiveChannel and mRedirectChannel in that class.
67 void completeRedirect
(in boolean succeeded
);