WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.
@mozilla.org/imgmanager;1
This component implements the following interfaces:
Constants
| PRUint32 | nsIContentPolicy.TYPE_OTHER | = 1 |
| Indicates an executable script (such as JavaScript). | ||
| PRUint32 | nsIContentPolicy.TYPE_SCRIPT | = 2 |
| Indicates an image (e.g., IMG elements). | ||
| PRUint32 | nsIContentPolicy.TYPE_IMAGE | = 3 |
| Indicates a stylesheet (e.g., STYLE elements). | ||
| PRUint32 | nsIContentPolicy.TYPE_STYLESHEET | = 4 |
| Indicates a generic object (plugin-handled content typically falls under this category). | ||
| PRUint32 | nsIContentPolicy.TYPE_OBJECT | = 5 |
| Indicates a document at the top-level (i.e., in a browser). | ||
| PRUint32 | nsIContentPolicy.TYPE_DOCUMENT | = 6 |
| Indicates a document contained within another document (e.g., IFRAMEs, FRAMES, and OBJECTs). | ||
| PRUint32 | nsIContentPolicy.TYPE_SUBDOCUMENT | = 7 |
| Indicates a timed refresh.
ShouldLoad will never get this, because it does not represent content to be loaded (the actual load triggered by the refresh will go through shouldLoad as expected). ShouldProcess will get this for, e.g., META Refresh elements and HTTP Refresh headers. | ||
| PRUint32 | nsIContentPolicy.TYPE_REFRESH | = 8 |
| Indicates an XBL binding request, triggered either by -moz-binding CSS property or Document.addBinding method. | ||
| PRUint32 | nsIContentPolicy.TYPE_XBL | = 9 |
| Indicates a ping triggered by a click on element. | ||
| PRUint32 | nsIContentPolicy.TYPE_PING | = 10 |
| Indicates an XMLHttpRequest. | ||
| PRUint32 | nsIContentPolicy.TYPE_XMLHTTPREQUEST | = 11 |
| Indicates a request by a plugin. | ||
| PRUint32 | nsIContentPolicy.TYPE_OBJECT_SUBREQUEST | = 12 |
| Returned from shouldLoad or shouldProcess if the load or process request is rejected based on details of the request. | ||
| PRInt16 | nsIContentPolicy.REJECT_REQUEST | = -1 |
| Returned from shouldLoad or shouldProcess if the load/process is rejected
based solely on its type (of the above flags).
NOTE that it is not meant to stop future requests for this type--only the current request. | ||
| PRInt16 | nsIContentPolicy.REJECT_TYPE | = -2 |
| Returned from shouldLoad or shouldProcess if the load/process is rejected
based on the server it is hosted on or requested from (aContentLocation or
aRequestOrigin), e.g., if you block an IMAGE because it is served from
goatse.cx (even if you don't necessarily block other types from that
server/domain).
NOTE that it is not meant to stop future requests for this server--only the current request. | ||
| PRInt16 | nsIContentPolicy.REJECT_SERVER | = -3 |
| Returned from shouldLoad or shouldProcess if the load/process is rejected based on some other criteria. Mozilla callers will handle this like REJECT_REQUEST; third-party implementors may, for example, use this to direct their own callers to consult the extra parameter for additional details. | ||
| PRInt16 | nsIContentPolicy.REJECT_OTHER | = -4 |
| Returned from shouldLoad or shouldProcess if the load or process request is not rejected. | ||
| PRInt16 | nsIContentPolicy.ACCEPT | = 1 |
Methods
| Interface | Method |
|---|---|
| nsISupportsWeakReference |
nsIWeakReference GetWeakReference ( )
|
| nsIObserver |
void observe ( nsISupports subject , char* topic , PRUnichar* data )
|
| nsIContentPolicy |
PRInt16 shouldLoad ( PRUint32 contentType , nsIURI contentLocation , nsIURI requestOrigin , nsISupports context , ACString mimeTypeGuess , nsISupports extra )
|
| nsIContentPolicy |
PRInt16 shouldProcess ( PRUint32 contentType , nsIURI contentLocation , nsIURI requestOrigin , nsISupports context , ACString mimeType , nsISupports extra )
|
Reference documentation is generated from Mozilla's source.
