michael@0: /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIChannel; michael@0: interface nsIContentViewer; michael@0: interface nsIStreamListener; michael@0: interface nsIDocShell; michael@0: interface nsIDocument; michael@0: interface nsILoadGroup; michael@0: interface nsIPrincipal; michael@0: michael@0: /** michael@0: * To get a component that implements nsIDocumentLoaderFactory michael@0: * for a given mimetype, use nsICategoryManager to find an entry michael@0: * with the mimetype as its name in the category "Gecko-Content-Viewers". michael@0: * The value of the entry is the contractid of the component. michael@0: * The component is a service, so use GetService, not CreateInstance to get it. michael@0: */ michael@0: michael@0: [scriptable, uuid(70905274-8494-4e39-b011-d559adde3733)] michael@0: interface nsIDocumentLoaderFactory : nsISupports { michael@0: nsIContentViewer createInstance(in string aCommand, michael@0: in nsIChannel aChannel, michael@0: in nsILoadGroup aLoadGroup, michael@0: in string aContentType, michael@0: in nsIDocShell aContainer, michael@0: in nsISupports aExtraInfo, michael@0: out nsIStreamListener aDocListenerResult); michael@0: michael@0: nsIContentViewer createInstanceForDocument(in nsISupports aContainer, michael@0: in nsIDocument aDocument, michael@0: in string aCommand); michael@0: michael@0: /** michael@0: * Create a blank document using the given loadgroup and given michael@0: * principal. aPrincipal is allowed to be null, in which case the michael@0: * new document will get the about:blank codebase principal. michael@0: */ michael@0: nsIDocument createBlankDocument(in nsILoadGroup aLoadGroup, michael@0: in nsIPrincipal aPrincipal); michael@0: };