Struct xpcom::interfaces::nsIAddonPolicyService
[−]
[src]
#[repr(C)]pub struct nsIAddonPolicyService { /* fields omitted */ }
interface nsIAddonPolicyService : nsISupports
/**
* This interface allows the security manager to query custom per-addon security
* policy.
*/
Methods
impl nsIAddonPolicyService
[src]
pub fn coerce<T: nsIAddonPolicyServiceCoerce>(&self) -> &T
[src]
Cast this nsIAddonPolicyService
to one of its base interfaces.
impl nsIAddonPolicyService
[src]
pub unsafe fn GetBaseCSP(&self, aBaseCSP: &mut nsAString) -> nsresult
[src]
/**
* Returns the base content security policy, which is applied to all
* extension documents, in addition to any custom policies.
*/
readonly attribute AString baseCSP;
pub unsafe fn GetDefaultCSP(&self, aDefaultCSP: &mut nsAString) -> nsresult
[src]
/**
* Returns the default content security policy which applies to extension
* documents which do not specify any custom policies.
*/
readonly attribute AString defaultCSP;
pub unsafe fn GetAddonCSP(
&self,
aAddonId: &nsAString,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
aAddonId: &nsAString,
_retval: &mut nsAString
) -> nsresult
/**
* Returns the content security policy which applies to documents belonging
* to the extension with the given ID. This may be either a custom policy,
* if one was supplied, or the default policy if one was not.
*/
AString getAddonCSP (in AString aAddonId);
pub unsafe fn GetGeneratedBackgroundPageUrl(
&self,
aAddonId: &nsACString,
_retval: &mut nsACString
) -> nsresult
[src]
&self,
aAddonId: &nsACString,
_retval: &mut nsACString
) -> nsresult
/**
* Returns the generated background page as a data-URI, if any. If the addon
* does not have an auto-generated background page, an empty string is
* returned.
*/
ACString getGeneratedBackgroundPageUrl (in ACString aAddonId);
pub unsafe fn AddonHasPermission(
&self,
aAddonId: &nsAString,
aPerm: &nsAString,
_retval: *mut bool
) -> nsresult
[src]
&self,
aAddonId: &nsAString,
aPerm: &nsAString,
_retval: *mut bool
) -> nsresult
/**
* Returns true if the addon was granted the |aPerm| API permission.
*/
boolean addonHasPermission (in AString aAddonId, in AString aPerm);
pub unsafe fn AddonMayLoadURI(
&self,
aAddonId: &nsAString,
aURI: *const nsIURI,
aExplicit: bool,
_retval: *mut bool
) -> nsresult
[src]
&self,
aAddonId: &nsAString,
aURI: *const nsIURI,
aExplicit: bool,
_retval: *mut bool
) -> nsresult
/**
* Returns true if unprivileged code associated with the given addon may load
* data from |aURI|. If |aExplicit| is true, the <all_urls> permission and
* permissive host globs are ignored when checking for a match.
*/
boolean addonMayLoadURI (in AString aAddonId, in nsIURI aURI, [optional] in boolean aExplicit);
pub unsafe fn GetExtensionName(
&self,
aAddonId: &nsAString,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
aAddonId: &nsAString,
_retval: &mut nsAString
) -> nsresult
/**
* Returns the name of the WebExtension with the given ID, or the ID string
* if no matching add-on can be found.
*/
AString getExtensionName (in AString aAddonId);
pub unsafe fn ExtensionURILoadableByAnyone(
&self,
aURI: *const nsIURI,
_retval: *mut bool
) -> nsresult
[src]
&self,
aURI: *const nsIURI,
_retval: *mut bool
) -> nsresult
/**
* Returns true if a given extension:// URI is web-accessible.
*/
boolean extensionURILoadableByAnyone (in nsIURI aURI);
pub unsafe fn ExtensionURIToAddonId(
&self,
aURI: *const nsIURI,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
aURI: *const nsIURI,
_retval: &mut nsAString
) -> nsresult
/**
* Maps an extension URI to the ID of the addon it belongs to.
*/
AString extensionURIToAddonId (in nsIURI aURI);
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 nsIAddonPolicyService
[src]
const IID: nsIID
IID: nsIID = nsID(2315472633, 40212, 19549, [131, 25, 6, 193, 171, 87, 75, 170])
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 nsIAddonPolicyService
[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 nsIAddonPolicyService
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.