nsIContentHandler.idl 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #include "nsISupports.idl"
  6. interface nsIRequest;
  7. interface nsIInterfaceRequestor;
  8. [scriptable, uuid(49439df2-b3d2-441c-bf62-866bdaf56fd2)]
  9. interface nsIContentHandler : nsISupports
  10. {
  11. /**
  12. * Tells the content handler to take over handling the content. If this
  13. * function succeeds, the URI Loader will leave this request alone, ignoring
  14. * progress notifications. Failure of this method will cause the request to be
  15. * cancelled, unless the error code is NS_ERROR_WONT_HANDLE_CONTENT (see
  16. * below).
  17. *
  18. * @param aWindowContext
  19. * Window context, used to get things like the current nsIDOMWindow
  20. * for this request. May be null.
  21. * @param aContentType
  22. * The content type of aRequest
  23. * @param aRequest
  24. * A request whose content type is already known.
  25. *
  26. * @throw NS_ERROR_WONT_HANDLE_CONTENT Indicates that this handler does not
  27. * want to handle this content. A different way for handling this
  28. * content should be tried.
  29. */
  30. void handleContent(in string aContentType,
  31. in nsIInterfaceRequestor aWindowContext,
  32. in nsIRequest aRequest);
  33. };