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

     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 };

mercurial