1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/docshell/base/nsIDocumentLoaderFactory.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,46 @@ 1.4 +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#include "nsISupports.idl" 1.11 + 1.12 +interface nsIChannel; 1.13 +interface nsIContentViewer; 1.14 +interface nsIStreamListener; 1.15 +interface nsIDocShell; 1.16 +interface nsIDocument; 1.17 +interface nsILoadGroup; 1.18 +interface nsIPrincipal; 1.19 + 1.20 +/** 1.21 + * To get a component that implements nsIDocumentLoaderFactory 1.22 + * for a given mimetype, use nsICategoryManager to find an entry 1.23 + * with the mimetype as its name in the category "Gecko-Content-Viewers". 1.24 + * The value of the entry is the contractid of the component. 1.25 + * The component is a service, so use GetService, not CreateInstance to get it. 1.26 + */ 1.27 + 1.28 +[scriptable, uuid(70905274-8494-4e39-b011-d559adde3733)] 1.29 +interface nsIDocumentLoaderFactory : nsISupports { 1.30 + nsIContentViewer createInstance(in string aCommand, 1.31 + in nsIChannel aChannel, 1.32 + in nsILoadGroup aLoadGroup, 1.33 + in string aContentType, 1.34 + in nsIDocShell aContainer, 1.35 + in nsISupports aExtraInfo, 1.36 + out nsIStreamListener aDocListenerResult); 1.37 + 1.38 + nsIContentViewer createInstanceForDocument(in nsISupports aContainer, 1.39 + in nsIDocument aDocument, 1.40 + in string aCommand); 1.41 + 1.42 + /** 1.43 + * Create a blank document using the given loadgroup and given 1.44 + * principal. aPrincipal is allowed to be null, in which case the 1.45 + * new document will get the about:blank codebase principal. 1.46 + */ 1.47 + nsIDocument createBlankDocument(in nsILoadGroup aLoadGroup, 1.48 + in nsIPrincipal aPrincipal); 1.49 +};