nsIDocumentLoaderFactory.idl 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2. *
  3. * This Source Code Form is subject to the terms of the Mozilla Public
  4. * License, v. 2.0. If a copy of the MPL was not distributed with this
  5. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  6. #include "nsISupports.idl"
  7. interface nsIChannel;
  8. interface nsIContentViewer;
  9. interface nsIStreamListener;
  10. interface nsIDocShell;
  11. interface nsIDocument;
  12. interface nsILoadGroup;
  13. interface nsIPrincipal;
  14. /**
  15. * To get a component that implements nsIDocumentLoaderFactory
  16. * for a given mimetype, use nsICategoryManager to find an entry
  17. * with the mimetype as its name in the category "Gecko-Content-Viewers".
  18. * The value of the entry is the contractid of the component.
  19. * The component is a service, so use GetService, not CreateInstance to get it.
  20. */
  21. [scriptable, uuid(e795239e-9d3c-47c4-b063-9e600fb3b287)]
  22. interface nsIDocumentLoaderFactory : nsISupports {
  23. nsIContentViewer createInstance(in string aCommand,
  24. in nsIChannel aChannel,
  25. in nsILoadGroup aLoadGroup,
  26. in ACString aContentType,
  27. in nsIDocShell aContainer,
  28. in nsISupports aExtraInfo,
  29. out nsIStreamListener aDocListenerResult);
  30. nsIContentViewer createInstanceForDocument(in nsISupports aContainer,
  31. in nsIDocument aDocument,
  32. in string aCommand);
  33. /**
  34. * Create a blank document using the given loadgroup and given
  35. * principal. aPrincipal is allowed to be null, in which case the
  36. * new document will get the about:blank codebase principal.
  37. */
  38. nsIDocument createBlankDocument(in nsILoadGroup aLoadGroup,
  39. in nsIPrincipal aPrincipal);
  40. };