nsIParentRedirectingChannel.idl 1.7 KB

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