michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsIParentChannel.idl" michael@0: michael@0: interface nsITabParent; michael@0: interface nsIChannel; michael@0: interface nsIAsyncVerifyRedirectCallback; michael@0: michael@0: /** michael@0: * Implemented by chrome side of IPC protocols that support redirect responses. michael@0: */ michael@0: michael@0: [scriptable, uuid(3ed1d288-5324-46ee-8a98-33ac37d1080b)] michael@0: interface nsIParentRedirectingChannel : nsIParentChannel michael@0: { michael@0: /** michael@0: * Called when the channel got a response that redirects it to a different michael@0: * URI. The implementation is responsible for calling the redirect observers michael@0: * on the child process and provide the decision result to the callback. michael@0: * michael@0: * @param newChannelId michael@0: * id of the redirect channel obtained from nsIRedirectChannelRegistrar. michael@0: * @param newURI michael@0: * the URI we redirect to michael@0: * @param callback michael@0: * redirect result callback, usage is compatible with how michael@0: * nsIChannelEventSink defines it michael@0: */ michael@0: void startRedirect(in uint32_t newChannelId, michael@0: in nsIChannel newChannel, michael@0: in uint32_t redirectFlags, michael@0: in nsIAsyncVerifyRedirectCallback callback); michael@0: michael@0: /** michael@0: * Called after we are done with redirecting process and we know if to michael@0: * redirect or not. Forward the redirect result to the child process. From michael@0: * that moment the nsIParentChannel implementation expects it will be michael@0: * forwarded all notifications from the 'real' channel. michael@0: * michael@0: * Primarilly used by HttpChannelParentListener::OnRedirectResult and kept michael@0: * as mActiveChannel and mRedirectChannel in that class. michael@0: */ michael@0: void completeRedirect(in boolean succeeded); michael@0: };