netwerk/base/public/nsIParentRedirectingChannel.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/base/public/nsIParentRedirectingChannel.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,46 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#include "nsIParentChannel.idl"
     1.9 +
    1.10 +interface nsITabParent;
    1.11 +interface nsIChannel;
    1.12 +interface nsIAsyncVerifyRedirectCallback;
    1.13 +
    1.14 +/**
    1.15 + * Implemented by chrome side of IPC protocols that support redirect responses.
    1.16 + */
    1.17 +
    1.18 +[scriptable, uuid(3ed1d288-5324-46ee-8a98-33ac37d1080b)]
    1.19 +interface nsIParentRedirectingChannel : nsIParentChannel
    1.20 +{
    1.21 +  /**
    1.22 +   * Called when the channel got a response that redirects it to a different
    1.23 +   * URI.  The implementation is responsible for calling the redirect observers
    1.24 +   * on the child process and provide the decision result to the callback.
    1.25 +   *
    1.26 +   * @param newChannelId
    1.27 +   *    id of the redirect channel obtained from nsIRedirectChannelRegistrar.
    1.28 +   * @param newURI
    1.29 +   *    the URI we redirect to
    1.30 +   * @param callback
    1.31 +   *    redirect result callback, usage is compatible with how
    1.32 +   *    nsIChannelEventSink defines it
    1.33 +   */
    1.34 +  void startRedirect(in uint32_t newChannelId,
    1.35 +                     in nsIChannel newChannel,
    1.36 +                     in uint32_t redirectFlags,
    1.37 +                     in nsIAsyncVerifyRedirectCallback callback);
    1.38 +
    1.39 +  /**
    1.40 +   * Called after we are done with redirecting process and we know if to
    1.41 +   * redirect or not.  Forward the redirect result to the child process.  From
    1.42 +   * that moment the nsIParentChannel implementation expects it will be
    1.43 +   * forwarded all notifications from the 'real' channel.
    1.44 +   *
    1.45 +   * Primarilly used by HttpChannelParentListener::OnRedirectResult and kept
    1.46 +   * as mActiveChannel and mRedirectChannel in that class.
    1.47 +   */
    1.48 +  void completeRedirect(in boolean succeeded);
    1.49 +};

mercurial