Struct xpcom::interfaces::nsIScriptSecurityManager
[−]
[src]
#[repr(C)]pub struct nsIScriptSecurityManager { /* fields omitted */ }
interface nsIScriptSecurityManager : nsISupports
Methods
impl nsIScriptSecurityManager
[src]
pub fn coerce<T: nsIScriptSecurityManagerCoerce>(&self) -> &T
[src]
Cast this nsIScriptSecurityManager
to one of its base interfaces.
impl nsIScriptSecurityManager
[src]
pub const STANDARD: i64
STANDARD: i64 = 0
/**
* Default CheckLoadURI permissions
*/
pub const LOAD_IS_AUTOMATIC_DOCUMENT_REPLACEMENT: i64
LOAD_IS_AUTOMATIC_DOCUMENT_REPLACEMENT: i64 = 1
pub const ALLOW_CHROME: i64
ALLOW_CHROME: i64 = 2
pub const DISALLOW_INHERIT_PRINCIPAL: i64
DISALLOW_INHERIT_PRINCIPAL: i64 = 4
pub const DISALLOW_SCRIPT_OR_DATA: i64
DISALLOW_SCRIPT_OR_DATA: i64 = 4
pub const DISALLOW_SCRIPT: i64
DISALLOW_SCRIPT: i64 = 8
pub const DONT_REPORT_ERRORS: i64
DONT_REPORT_ERRORS: i64 = 16
pub const NO_APP_ID: i64
NO_APP_ID: i64 = 0
pub const UNKNOWN_APP_ID: i64
UNKNOWN_APP_ID: i64 = 4294967295
pub const DEFAULT_USER_CONTEXT_ID: i64
DEFAULT_USER_CONTEXT_ID: i64 = 0
pub unsafe fn CheckLoadURIWithPrincipal(
&self,
aPrincipal: *const nsIPrincipal,
uri: *const nsIURI,
flags: uint32_t
) -> nsresult
[src]
&self,
aPrincipal: *const nsIPrincipal,
uri: *const nsIURI,
flags: uint32_t
) -> nsresult
/**
* Check that content with principal aPrincipal can load "uri".
*
* Will return error code NS_ERROR_DOM_BAD_URI if the load request
* should be denied.
*
* @param aPrincipal the principal identifying the actor causing the load
* @param uri the URI that is being loaded
* @param flags the permission set, see above
*/
void checkLoadURIWithPrincipal (in nsIPrincipal aPrincipal, in nsIURI uri, in unsigned long flags);
pub unsafe fn CheckLoadURIStrWithPrincipal(
&self,
aPrincipal: *const nsIPrincipal,
uri: &nsACString,
flags: uint32_t
) -> nsresult
[src]
&self,
aPrincipal: *const nsIPrincipal,
uri: &nsACString,
flags: uint32_t
) -> nsresult
/**
* Similar to checkLoadURIWithPrincipal but there are two differences:
*
* 1) The URI is a string, not a URI object.
* 2) This function assumes that the URI may still be subject to fixup (and
* hence will check whether fixed-up versions of the URI are allowed to
* load as well); if any of the versions of this URI is not allowed, this
* function will return error code NS_ERROR_DOM_BAD_URI.
*/
void checkLoadURIStrWithPrincipal (in nsIPrincipal aPrincipal, in AUTF8String uri, in unsigned long flags);
pub unsafe fn InFileURIWhitelist(
&self,
aUri: *const nsIURI,
_retval: *mut bool
) -> nsresult
[src]
&self,
aUri: *const nsIURI,
_retval: *mut bool
) -> nsresult
/**
* Returns true if the URI is from a domain that is white-listed through
* prefs to be allowed to use file:// URIs.
* @param aUri the URI to be tested
*/
bool inFileURIWhitelist (in nsIURI aUri);
pub unsafe fn GetSystemPrincipal(
&self,
_retval: *mut *const nsIPrincipal
) -> nsresult
[src]
&self,
_retval: *mut *const nsIPrincipal
) -> nsresult
/**
* Return the all-powerful system principal.
*/
nsIPrincipal getSystemPrincipal ();
pub unsafe fn GetLoadContextCodebasePrincipal(
&self,
uri: *const nsIURI,
loadContext: *const nsILoadContext,
_retval: *mut *const nsIPrincipal
) -> nsresult
[src]
&self,
uri: *const nsIURI,
loadContext: *const nsILoadContext,
_retval: *mut *const nsIPrincipal
) -> nsresult
/**
* Returns a principal that has the OriginAttributes of the load context.
* @param loadContext to get the OriginAttributes from.
*/
nsIPrincipal getLoadContextCodebasePrincipal (in nsIURI uri, in nsILoadContext loadContext);
pub unsafe fn GetDocShellCodebasePrincipal(
&self,
uri: *const nsIURI,
docShell: *const nsIDocShell,
_retval: *mut *const nsIPrincipal
) -> nsresult
[src]
&self,
uri: *const nsIURI,
docShell: *const nsIDocShell,
_retval: *mut *const nsIPrincipal
) -> nsresult
/**
* Returns a principal that has the OriginAttributes of the docshell.
* @param docShell to get the OriginAttributes from.
*/
nsIPrincipal getDocShellCodebasePrincipal (in nsIURI uri, in nsIDocShell docShell);
pub unsafe fn CreateCodebasePrincipalFromOrigin(
&self,
origin: &nsACString,
_retval: *mut *const nsIPrincipal
) -> nsresult
[src]
&self,
origin: &nsACString,
_retval: *mut *const nsIPrincipal
) -> nsresult
/**
* Returns a principal whose origin is the one we pass in.
* See nsIPrincipal.idl for a description of origin attributes, and
* ChromeUtils.webidl for a list of origin attributes and their defaults.
*/
nsIPrincipal createCodebasePrincipalFromOrigin (in ACString origin);
pub unsafe fn CheckSameOriginURI(
&self,
aSourceURI: *const nsIURI,
aTargetURI: *const nsIURI,
reportError: bool
) -> nsresult
[src]
&self,
aSourceURI: *const nsIURI,
aTargetURI: *const nsIURI,
reportError: bool
) -> nsresult
/**
* Returns OK if aSourceURI and target have the same "origin"
* (scheme, host, and port).
* ReportError flag suppresses error reports for functions that
* don't need reporting.
*/
void checkSameOriginURI (in nsIURI aSourceURI, in nsIURI aTargetURI, in boolean reportError);
pub unsafe fn GetChannelResultPrincipal(
&self,
aChannel: *const nsIChannel,
_retval: *mut *const nsIPrincipal
) -> nsresult
[src]
&self,
aChannel: *const nsIChannel,
_retval: *mut *const nsIPrincipal
) -> nsresult
/**
* Get the principal for the given channel. This will typically be the
* channel owner if there is one, and the codebase principal for the
* channel's URI otherwise. aChannel must not be null.
*/
nsIPrincipal getChannelResultPrincipal (in nsIChannel aChannel);
pub unsafe fn GetChannelURIPrincipal(
&self,
aChannel: *const nsIChannel,
_retval: *mut *const nsIPrincipal
) -> nsresult
[src]
&self,
aChannel: *const nsIChannel,
_retval: *mut *const nsIPrincipal
) -> nsresult
/**
* Get the codebase principal for the channel's URI.
* aChannel must not be null.
*/
nsIPrincipal getChannelURIPrincipal (in nsIChannel aChannel);
pub unsafe fn IsSystemPrincipal(
&self,
aPrincipal: *const nsIPrincipal,
_retval: *mut bool
) -> nsresult
[src]
&self,
aPrincipal: *const nsIPrincipal,
_retval: *mut bool
) -> nsresult
/**
* Check whether a given principal is a system principal. This allows us
* to avoid handing back the system principal to script while allowing
* script to check whether a given principal is system.
*/
boolean isSystemPrincipal (in nsIPrincipal aPrincipal);
pub unsafe fn ActivateDomainPolicy(
&self,
_retval: *mut *const nsIDomainPolicy
) -> nsresult
[src]
&self,
_retval: *mut *const nsIDomainPolicy
) -> nsresult
/**
* Per-domain controls to enable and disable script. This system is designed
* to be used by at most one consumer, and enforces this with its semantics.
*
* Initially, domainPolicyActive is false. When activateDomainPolicy() is
* invoked, domainPolicyActive becomes true, and subsequent calls to
* activateDomainPolicy() will fail until deactivate() is invoked on the
* nsIDomainPolicy returned from activateDomainPolicy(). At this point,
* domainPolicyActive becomes false again, and a new consumer may acquire
* control of the system by invoking activateDomainPolicy().
*/
nsIDomainPolicy activateDomainPolicy ();
pub unsafe fn GetDomainPolicyActive(
&self,
aDomainPolicyActive: *mut bool
) -> nsresult
[src]
&self,
aDomainPolicyActive: *mut bool
) -> nsresult
readonly attribute boolean domainPolicyActive;
pub unsafe fn ActivateDomainPolicyInternal(
&self,
_retval: *mut *const nsIDomainPolicy
) -> nsresult
[src]
&self,
_retval: *mut *const nsIDomainPolicy
) -> nsresult
/**
* Only the parent process can directly access domain policies, child
* processes only have a read-only mirror to the one in the parent.
* For child processes the mirror is updated via messages
* and ContentChild will hold the DomainPolicy by calling
* ActivateDomainPolicyInternal directly. New consumer to this
* function should not be addded.
*/
[noscript] nsIDomainPolicy activateDomainPolicyInternal ();
pub unsafe fn PolicyAllowsScript(
&self,
aDomain: *const nsIURI,
_retval: *mut bool
) -> nsresult
[src]
&self,
aDomain: *const nsIURI,
_retval: *mut bool
) -> nsresult
/**
* Query mechanism for the above policy.
*
* If domainPolicyEnabled is false, this simply returns the current value
* of javascript.enabled. Otherwise, it returns the same value, but taking
* the various blacklist/whitelist exceptions into account.
*/
bool policyAllowsScript (in nsIURI aDomain);
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIScriptSecurityManager
[src]
const IID: nsIID
IID: nsIID = nsID(1373285767, 14860, 17612, [182, 32, 115, 86, 128, 28, 144, 34])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsIScriptSecurityManager
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIScriptSecurityManager
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.