netwerk/base/public/nsIParentRedirectingChannel.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #include "nsIParentChannel.idl"
michael@0 6
michael@0 7 interface nsITabParent;
michael@0 8 interface nsIChannel;
michael@0 9 interface nsIAsyncVerifyRedirectCallback;
michael@0 10
michael@0 11 /**
michael@0 12 * Implemented by chrome side of IPC protocols that support redirect responses.
michael@0 13 */
michael@0 14
michael@0 15 [scriptable, uuid(3ed1d288-5324-46ee-8a98-33ac37d1080b)]
michael@0 16 interface nsIParentRedirectingChannel : nsIParentChannel
michael@0 17 {
michael@0 18 /**
michael@0 19 * Called when the channel got a response that redirects it to a different
michael@0 20 * URI. The implementation is responsible for calling the redirect observers
michael@0 21 * on the child process and provide the decision result to the callback.
michael@0 22 *
michael@0 23 * @param newChannelId
michael@0 24 * id of the redirect channel obtained from nsIRedirectChannelRegistrar.
michael@0 25 * @param newURI
michael@0 26 * the URI we redirect to
michael@0 27 * @param callback
michael@0 28 * redirect result callback, usage is compatible with how
michael@0 29 * nsIChannelEventSink defines it
michael@0 30 */
michael@0 31 void startRedirect(in uint32_t newChannelId,
michael@0 32 in nsIChannel newChannel,
michael@0 33 in uint32_t redirectFlags,
michael@0 34 in nsIAsyncVerifyRedirectCallback callback);
michael@0 35
michael@0 36 /**
michael@0 37 * Called after we are done with redirecting process and we know if to
michael@0 38 * redirect or not. Forward the redirect result to the child process. From
michael@0 39 * that moment the nsIParentChannel implementation expects it will be
michael@0 40 * forwarded all notifications from the 'real' channel.
michael@0 41 *
michael@0 42 * Primarilly used by HttpChannelParentListener::OnRedirectResult and kept
michael@0 43 * as mActiveChannel and mRedirectChannel in that class.
michael@0 44 */
michael@0 45 void completeRedirect(in boolean succeeded);
michael@0 46 };

mercurial