Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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 nsITabParent;
8 interface nsIChannel;
9 interface nsIAsyncVerifyRedirectCallback;
11 /**
12 * Implemented by chrome side of IPC protocols that support redirect responses.
13 */
15 [scriptable, uuid(3ed1d288-5324-46ee-8a98-33ac37d1080b)]
16 interface nsIParentRedirectingChannel : nsIParentChannel
17 {
18 /**
19 * Called when the channel got a response that redirects it to a different
20 * URI. The implementation is responsible for calling the redirect observers
21 * on the child process and provide the decision result to the callback.
22 *
23 * @param newChannelId
24 * id of the redirect channel obtained from nsIRedirectChannelRegistrar.
25 * @param newURI
26 * the URI we redirect to
27 * @param callback
28 * redirect result callback, usage is compatible with how
29 * nsIChannelEventSink defines it
30 */
31 void startRedirect(in uint32_t newChannelId,
32 in nsIChannel newChannel,
33 in uint32_t redirectFlags,
34 in nsIAsyncVerifyRedirectCallback callback);
36 /**
37 * Called after we are done with redirecting process and we know if to
38 * redirect or not. Forward the redirect result to the child process. From
39 * that moment the nsIParentChannel implementation expects it will be
40 * forwarded all notifications from the 'real' channel.
41 *
42 * Primarilly used by HttpChannelParentListener::OnRedirectResult and kept
43 * as mActiveChannel and mRedirectChannel in that class.
44 */
45 void completeRedirect(in boolean succeeded);
46 };