Follow-on fix for bug 457825. Use sheet principal for agent and user sheets. r=dbaron...
[wine-gecko.git] / content / base / public / nsIObjectLoadingContent.idl
blob3305780c345386679ee2e9dd9806325298d6f9c3
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org object loading code.
17 * The Initial Developer of the Original Code is
18 * Christian Biesinger <cbiesinger@web.de>.
19 * Portions created by the Initial Developer are Copyright (C) 2005
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 #include "nsISupports.idl"
40 interface nsIObjectFrame;
41 interface nsIPluginInstance;
43 /**
44 * This interface represents a content node that loads objects.
46 [scriptable, uuid(90ab443e-3e99-405e-88c9-9c42adaa3217)]
47 interface nsIObjectLoadingContent : nsISupports
49 const unsigned long TYPE_LOADING = 0;
50 const unsigned long TYPE_IMAGE = 1;
51 const unsigned long TYPE_PLUGIN = 2;
52 const unsigned long TYPE_DOCUMENT = 3;
53 const unsigned long TYPE_NULL = 4;
55 /**
56 * The actual mime type (the one we got back from the network
57 * request) for the element.
59 readonly attribute ACString actualType;
61 /**
62 * Gets the type of the content that's currently loaded. See
63 * the constants above for the list of possible values.
65 readonly attribute unsigned long displayedType;
67 /**
68 * Gets the content type that corresponds to the give MIME type. See the
69 * constants above for the list of possible values. If nothing else fits,
70 * TYPE_NULL will be returned.
72 unsigned long getContentTypeForMIMEType(in AUTF8String aMimeType);
74 /**
75 * Returns the plugin instance if it has already been instantiated. This
76 * will never instantiate the plugin and so is safe to call even when
77 * content script must not execute.
79 [noscript] readonly attribute nsIPluginInstance pluginInstance;
82 /**
83 * Makes sure that a frame for this object exists, and that the plugin is
84 * instantiated. This method does nothing if the type is not #TYPE_PLUGIN.
85 * There is no guarantee that there will be a frame after this method is
86 * called; for example, the node may have a display:none style. If plugin
87 * instantiation is possible, it will be done synchronously by this method,
88 * and the plugin instance will be returned. A success return value does not
89 * necessarily mean that the instance is nonnull.
91 * This is a noscript method because it is internal and will go away once
92 * plugin loading moves to content.
94 * @note If there is an error instantiating the plugin, this method will
95 * trigger fallback to replacement content, and the type will change (and
96 * this method will return a failure code)
98 [noscript] nsIPluginInstance ensureInstantiation();
101 * Tells the content about an associated object frame.
102 * This can be called multiple times for different frames.
104 * This is noscript because this is an internal method that will go away, and
105 * because nsIObjectFrame is unscriptable.
107 [noscript] void hasNewFrame(in nsIObjectFrame aFrame);