Bug 1179718 - Rename CheckPermissions to CheckAnyPermissions. r=bz

This commit is contained in:
Kan-Ru Chen 2015-07-14 10:25:26 +08:00
parent e23f1dd401
commit aa41d37da1
95 changed files with 218 additions and 218 deletions

View File

@ -2415,7 +2415,7 @@ EnumerateGlobal(JSContext* aCx, JS::Handle<JSObject*> aObj)
}
bool
CheckPermissions(JSContext* aCx, JSObject* aObj, const char* const aPermissions[])
CheckAnyPermissions(JSContext* aCx, JSObject* aObj, const char* const aPermissions[])
{
JS::Rooted<JSObject*> rootedObj(aCx, aObj);
nsPIDOMWindow* window = xpc::WindowGlobalOrNull(rootedObj);

View File

@ -3094,7 +3094,7 @@ AssertReturnTypeMatchesJitinfo(const JSJitInfo* aJitinfo,
// Returns true if aObj's global has any of the permissions named in aPermissions
// set to nsIPermissionManager::ALLOW_ACTION. aPermissions must be null-terminated.
bool
CheckPermissions(JSContext* aCx, JSObject* aObj, const char* const aPermissions[]);
CheckAnyPermissions(JSContext* aCx, JSObject* aObj, const char* const aPermissions[]);
// Returns true if aObj's global has all of the permissions named in aPermissions
// set to nsIPermissionManager::ALLOW_ACTION. aPermissions must be null-terminated.

View File

@ -1895,11 +1895,11 @@ class MemberCondition:
None, they should be strings that have the pref name (for "pref")
or function name (for "func" and "available").
"""
def __init__(self, pref, func, available=None, checkPermissions=None, checkAllPermissions=None):
def __init__(self, pref, func, available=None, checkAnyPermissions=None, checkAllPermissions=None):
assert pref is None or isinstance(pref, str)
assert func is None or isinstance(func, str)
assert available is None or isinstance(available, str)
assert checkPermissions is None or isinstance(checkPermissions, int)
assert checkAnyPermissions is None or isinstance(checkAnyPermissions, int)
assert checkAllPermissions is None or isinstance(checkAllPermissions, int)
self.pref = pref
@ -1909,10 +1909,10 @@ class MemberCondition:
return "&" + val
self.func = toFuncPtr(func)
self.available = toFuncPtr(available)
if checkPermissions is None:
self.checkPermissions = "nullptr"
if checkAnyPermissions is None:
self.checkAnyPermissions = "nullptr"
else:
self.checkPermissions = "permissions_%i" % checkPermissions
self.checkAnyPermissions = "anypermissions_%i" % checkAnyPermissions
if checkAllPermissions is None:
self.checkAllPermissions = "nullptr"
else:
@ -1921,7 +1921,7 @@ class MemberCondition:
def __eq__(self, other):
return (self.pref == other.pref and self.func == other.func and
self.available == other.available and
self.checkPermissions == other.checkPermissions and
self.checkAnyPermissions == other.checkAnyPermissions and
self.checkAllPermissions == other.checkAllPermissions)
def __ne__(self, other):
@ -1990,7 +1990,7 @@ class PropertyDefiner:
PropertyDefiner.getStringAttr(interfaceMember,
"Func"),
getAvailableInTestFunc(interfaceMember),
descriptor.checkPermissionsIndicesForMembers.get(interfaceMember.identifier.name),
descriptor.checkAnyPermissionsIndicesForMembers.get(interfaceMember.identifier.name),
descriptor.checkAllPermissionsIndicesForMembers.get(interfaceMember.identifier.name))
def generatePrefableArray(self, array, name, specFormatter, specTerminator,
@ -2043,7 +2043,7 @@ class PropertyDefiner:
prefableSpecs.append(prefableTemplate %
(condition.func,
condition.available,
condition.checkPermissions,
condition.checkAnyPermissions,
condition.checkAllPermissions,
name + "_specs", len(specs)))
@ -3175,9 +3175,9 @@ class CGConstructorEnabled(CGAbstractMethod):
availableIn = getAvailableInTestFunc(iface)
if availableIn:
conditions.append("%s(aCx, aObj)" % availableIn)
checkPermissions = self.descriptor.checkPermissionsIndex
if checkPermissions is not None:
conditions.append("CheckPermissions(aCx, aObj, permissions_%i)" % checkPermissions)
checkAnyPermissions = self.descriptor.checkAnyPermissionsIndex
if checkAnyPermissions is not None:
conditions.append("CheckAnyPermissions(aCx, aObj, anypermissions_%i)" % checkAnyPermissions)
checkAllPermissions = self.descriptor.checkAllPermissionsIndex
if checkAllPermissions is not None:
conditions.append("CheckAllPermissions(aCx, aObj, allpermissions_%i)" % checkAllPermissions)
@ -11447,7 +11447,7 @@ class CGDescriptor(CGThing):
if descriptor.concrete and descriptor.wrapperCache:
cgThings.append(CGClassObjectMovedHook(descriptor))
for name in ["permissions", "allpermissions"]:
for name in ["anypermissions", "allpermissions"]:
permissions = getattr(descriptor, name)
if len(permissions):
for (k, v) in sorted(permissions.items()):

View File

@ -546,7 +546,7 @@ class Descriptor(DescriptorProvider):
self._binaryNames.setdefault('__stringifier', 'Stringify')
if not self.interface.isExternal():
self.permissions = dict()
self.anypermissions = dict()
self.allpermissions = dict()
# Adds a permission list to this descriptor and returns the index to use.
@ -554,7 +554,7 @@ class Descriptor(DescriptorProvider):
if attribute == "CheckAllPermissions":
permissions = self.allpermissions
else:
permissions = self.permissions
permissions = self.anypermissions
checkPermissions = ifaceOrMember.getExtendedAttribute(attribute)
if checkPermissions is None:
@ -571,14 +571,14 @@ class Descriptor(DescriptorProvider):
permissionsList = tuple(sorted(set(permissionsList)))
return permissions.setdefault(permissionsList, len(permissions))
self.checkPermissionsIndex = addPermissions(self.interface, "CheckPermissions")
self.checkPermissionsIndicesForMembers = dict()
self.checkAnyPermissionsIndex = addPermissions(self.interface, "CheckAnyPermissions")
self.checkAnyPermissionsIndicesForMembers = dict()
self.checkAllPermissionsIndex = addPermissions(self.interface, "CheckAllPermissions")
self.checkAllPermissionsIndicesForMembers = dict()
for m in self.interface.members:
permissionsIndex = addPermissions(m, "CheckPermissions")
permissionsIndex = addPermissions(m, "CheckAnyPermissions")
if permissionsIndex is not None:
self.checkPermissionsIndicesForMembers[m.identifier.name] = permissionsIndex
self.checkAnyPermissionsIndicesForMembers[m.identifier.name] = permissionsIndex
allpermissionsIndex = addPermissions(m, "CheckAllPermissions")
if allpermissionsIndex is not None:
self.checkAllPermissionsIndicesForMembers[m.identifier.name] = allpermissionsIndex
@ -590,7 +590,7 @@ class Descriptor(DescriptorProvider):
self.featureDetectibleThings = set()
if not isTestInterface(self.interface):
if (self.interface.getExtendedAttribute("CheckPermissions") or
if (self.interface.getExtendedAttribute("CheckAnyPermissions") or
self.interface.getExtendedAttribute("CheckAllPermissions") or
self.interface.getExtendedAttribute("AvailableIn") == "PrivilegedApps"):
if self.interface.getNavigatorProperty():
@ -602,7 +602,7 @@ class Descriptor(DescriptorProvider):
self.featureDetectibleThings.add("%s.%s" % (iface, m.identifier.name))
for m in self.interface.members:
if (m.getExtendedAttribute("CheckPermissions") or
if (m.getExtendedAttribute("CheckAnyPermissions") or
m.getExtendedAttribute("CheckAllPermissions") or
m.getExtendedAttribute("AvailableIn") == "PrivilegedApps"):
self.featureDetectibleThings.add("%s.%s" % (self.interface.identifier.name, m.identifier.name))

View File

@ -40,7 +40,7 @@ typedef bool
JS::AutoIdVector& props);
bool
CheckPermissions(JSContext* aCx, JSObject* aObj, const char* const aPermissions[]);
CheckAnyPermissions(JSContext* aCx, JSObject* aObj, const char* const aPermissions[]);
bool
CheckAllPermissions(JSContext* aCx, JSObject* aObj, const char* const aPermissions[]);
@ -59,7 +59,7 @@ struct Prefable {
if (!enabled) {
return false;
}
if (!enabledFunc && !availableFunc && !checkPermissions && !checkAllPermissions) {
if (!enabledFunc && !availableFunc && !checkAnyPermissions && !checkAllPermissions) {
return true;
}
if (enabledFunc &&
@ -70,9 +70,9 @@ struct Prefable {
!availableFunc(cx, js::GetGlobalForObjectCrossCompartment(obj))) {
return false;
}
if (checkPermissions &&
!CheckPermissions(cx, js::GetGlobalForObjectCrossCompartment(obj),
checkPermissions)) {
if (checkAnyPermissions &&
!CheckAnyPermissions(cx, js::GetGlobalForObjectCrossCompartment(obj),
checkAnyPermissions)) {
return false;
}
if (checkAllPermissions &&
@ -94,7 +94,7 @@ struct Prefable {
// is basically a hack to avoid having to codegen PropertyEnabled
// implementations in case when we need to do two separate checks.
PropertyEnabled availableFunc;
const char* const* checkPermissions;
const char* const* checkAnyPermissions;
const char* const* checkAllPermissions;
// Array of specs, terminated in whatever way is customary for T.
// Null to indicate a end-of-array for Prefable, when such an

View File

@ -1134,7 +1134,7 @@ class IDLInterface(IDLObjectWithScope, IDLExposureMixins):
member.getExtendedAttribute("Pref") or
member.getExtendedAttribute("Func") or
member.getExtendedAttribute("AvailableIn") or
member.getExtendedAttribute("CheckPermissions") or
member.getExtendedAttribute("CheckAnyPermissions") or
member.getExtendedAttribute("CheckAllPermissions")):
raise WebIDLError("[Alias] must not be used on a "
"conditionally exposed operation",
@ -1167,7 +1167,7 @@ class IDLInterface(IDLObjectWithScope, IDLExposureMixins):
self.parentScope.primaryGlobalName,
[self.location])
for attribute in ["CheckPermissions", "CheckAllPermissions"]:
for attribute in ["CheckAnyPermissions", "CheckAllPermissions"]:
if (self.getExtendedAttribute(attribute) and
self._exposureGlobalNames != set([self.parentScope.primaryGlobalName])):
raise WebIDLError("[%s] used on an interface that is "
@ -1387,7 +1387,7 @@ class IDLInterface(IDLObjectWithScope, IDLExposureMixins):
identifier == "NavigatorProperty" or
identifier == "AvailableIn" or
identifier == "Func" or
identifier == "CheckPermissions" or
identifier == "CheckAnyPermissions" or
identifier == "CheckAllPermissions"):
# Known extended attributes that take a string value
if not attr.hasValue():
@ -1516,7 +1516,7 @@ class IDLInterface(IDLObjectWithScope, IDLExposureMixins):
self.getExtendedAttribute("ChromeOnly") or
self.getExtendedAttribute("Func") or
self.getExtendedAttribute("AvailableIn") or
self.getExtendedAttribute("CheckPermissions") or
self.getExtendedAttribute("CheckAnyPermissions") or
self.getExtendedAttribute("CheckAllPermissions"))
class IDLDictionary(IDLObjectWithScope):
@ -3365,7 +3365,7 @@ class IDLInterfaceMember(IDLObjectWithIdentifier, IDLExposureMixins):
"%s-only" % self._globalScope.primaryGlobalName,
[self.location])
for attribute in ["CheckPermissions", "CheckAllPermissions"]:
for attribute in ["CheckAnyPermissions", "CheckAllPermissions"]:
if (self.getExtendedAttribute(attribute) and
self.exposureSet != set([self._globalScope.primaryGlobalName])):
raise WebIDLError("[%s] used on an interface member that is "
@ -3712,7 +3712,7 @@ class IDLConst(IDLInterfaceMember):
identifier == "ChromeOnly" or
identifier == "Func" or
identifier == "AvailableIn" or
identifier == "CheckPermissions" or
identifier == "CheckAnyPermissions" or
identifier == "CheckAllPermissions"):
# Known attributes that we don't need to do anything with here
pass
@ -3980,7 +3980,7 @@ class IDLAttribute(IDLInterfaceMember):
identifier == "AvailableIn" or
identifier == "NewObject" or
identifier == "UnsafeInPrerendering" or
identifier == "CheckPermissions" or
identifier == "CheckAnyPermissions" or
identifier == "CheckAllPermissions" or
identifier == "BinaryName"):
# Known attributes that we don't need to do anything with here
@ -4656,7 +4656,7 @@ class IDLMethod(IDLInterfaceMember, IDLScope):
identifier == "Deprecated" or
identifier == "Func" or
identifier == "AvailableIn" or
identifier == "CheckPermissions" or
identifier == "CheckAnyPermissions" or
identifier == "CheckAllPermissions" or
identifier == "BinaryName" or
identifier == "MethodIdentityTestable" or

View File

@ -4,6 +4,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.inputport.enabled", CheckPermissions="inputport", AvailableIn=CertifiedApps]
[Pref="dom.inputport.enabled", CheckAnyPermissions="inputport", AvailableIn=CertifiedApps]
interface AVInputPort : InputPort {
};

View File

@ -8,7 +8,7 @@
[NavigatorProperty="mozAlarms",
JSImplementation="@mozilla.org/alarmsManager;1",
CheckPermissions="alarms",
CheckAnyPermissions="alarms",
Pref="dom.mozAlarms.enabled"]
interface AlarmsManager {
DOMRequest getAll();

View File

@ -24,7 +24,7 @@ enum LocaleResourceType {
[NoInterfaceObject, NavigatorProperty="mozApps",
JSImplementation="@mozilla.org/webapps;1"]
interface DOMApplicationsRegistry {
[CheckPermissions="webapps-manage homescreen-webapps-manage"]
[CheckAnyPermissions="webapps-manage homescreen-webapps-manage"]
readonly attribute DOMApplicationsManager mgmt;
DOMRequest install(DOMString url, optional InstallParameters params);
DOMRequest installPackage(DOMString url, optional InstallParameters params);
@ -116,22 +116,22 @@ interface DOMApplication : EventTarget {
[JSImplementation="@mozilla.org/webapps/manager;1",
ChromeOnly,
CheckPermissions="webapps-manage homescreen-webapps-manage"]
CheckAnyPermissions="webapps-manage homescreen-webapps-manage"]
interface DOMApplicationsManager : EventTarget {
DOMRequest getAll();
[CheckPermissions="webapps-manage"]
[CheckAnyPermissions="webapps-manage"]
DOMRequest getNotInstalled();
[CheckPermissions="webapps-manage"]
[CheckAnyPermissions="webapps-manage"]
void applyDownload(DOMApplication app);
DOMRequest uninstall(DOMApplication app);
[CheckPermissions="webapps-manage"]
[CheckAnyPermissions="webapps-manage"]
Promise<DOMApplication> import(Blob blob);
[CheckPermissions="webapps-manage"]
[CheckAnyPermissions="webapps-manage"]
Promise<any> extractManifest(Blob blob);
[CheckPermissions="webapps-manage"]
[CheckAnyPermissions="webapps-manage"]
void setEnabled(DOMApplication app, boolean state);
Promise<Blob> getIcon(DOMApplication app, DOMString iconID,
optional DOMString entryPoint);

View File

@ -6,7 +6,7 @@
[Constructor(DOMString typeArg,
optional BeforeAfterKeyboardEventInit eventInitDict),
CheckPermissions="embed-apps before-after-keyboard-event",
CheckAnyPermissions="embed-apps before-after-keyboard-event",
Pref="dom.beforeAfterKeyboardEvent.enabled"]
interface BeforeAfterKeyboardEvent : KeyboardEvent
{

View File

@ -32,7 +32,7 @@ dictionary MediaPlayStatus
DOMString playStatus = "";
};
[CheckPermissions="bluetooth"]
[CheckAnyPermissions="bluetooth"]
interface BluetoothAdapter : EventTarget {
readonly attribute DOMString address;
readonly attribute unsigned long class;

View File

@ -32,7 +32,7 @@ dictionary MediaPlayStatus
DOMString playStatus = "";
};
[CheckPermissions="bluetooth"]
[CheckAnyPermissions="bluetooth"]
interface BluetoothAdapter : EventTarget {
readonly attribute BluetoothAdapterState state;
[AvailableIn=CertifiedApps]

View File

@ -4,7 +4,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[CheckPermissions="bluetooth",
[CheckAnyPermissions="bluetooth",
Constructor(DOMString type, optional BluetoothAdapterEventInit eventInitDict)]
interface BluetoothAdapterEvent : Event
{

View File

@ -4,7 +4,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[CheckPermissions="bluetooth",
[CheckAnyPermissions="bluetooth",
Constructor(DOMString type,
optional BluetoothAttributeEventInit eventInitDict)]
interface BluetoothAttributeEvent : Event

View File

@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
[CheckPermissions="bluetooth"]
[CheckAnyPermissions="bluetooth"]
interface BluetoothClassOfDevice
{
/**

View File

@ -4,7 +4,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
[CheckPermissions="bluetooth"]
[CheckAnyPermissions="bluetooth"]
interface BluetoothDevice : EventTarget {
readonly attribute DOMString address;
readonly attribute DOMString name;

View File

@ -4,7 +4,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
[CheckPermissions="bluetooth"]
[CheckAnyPermissions="bluetooth"]
interface BluetoothDevice : EventTarget
{
readonly attribute DOMString address;

View File

@ -4,7 +4,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[CheckPermissions="bluetooth",
[CheckAnyPermissions="bluetooth",
Constructor(DOMString type, optional BluetoothDeviceEventInit eventInitDict)]
interface BluetoothDeviceEvent : Event
{

View File

@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
[CheckPermissions="bluetooth"]
[CheckAnyPermissions="bluetooth"]
interface BluetoothDiscoveryHandle : EventTarget {
attribute EventHandler ondevicefound;
};

View File

@ -6,7 +6,7 @@
[Constructor(DOMString type,
optional BluetoothDiscoveryStateChangedEventInit eventInitDict),
CheckPermissions="bluetooth"]
CheckAnyPermissions="bluetooth"]
interface BluetoothDiscoveryStateChangedEvent : Event
{
readonly attribute boolean discovering;

View File

@ -4,7 +4,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
[CheckPermissions="bluetooth"]
[CheckAnyPermissions="bluetooth"]
interface BluetoothGatt : EventTarget
{
[Cached, Pure]

View File

@ -16,7 +16,7 @@ dictionary GattCharacteristicProperties
required boolean extendedProps;
};
[CheckPermissions="bluetooth"]
[CheckAnyPermissions="bluetooth"]
interface BluetoothGattCharacteristic
{
readonly attribute BluetoothGattService service;

View File

@ -4,7 +4,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[CheckPermissions="bluetooth",
[CheckAnyPermissions="bluetooth",
Constructor(DOMString type,
optional BluetoothGattCharacteristicEventInit eventInitDict)]
interface BluetoothGattCharacteristicEvent : Event

View File

@ -4,7 +4,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
[CheckPermissions="bluetooth"]
[CheckAnyPermissions="bluetooth"]
interface BluetoothGattDescriptor
{
readonly attribute BluetoothGattCharacteristic characteristic;

View File

@ -4,7 +4,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
[CheckPermissions="bluetooth"]
[CheckAnyPermissions="bluetooth"]
interface BluetoothGattService
{
[Cached, Pure]

View File

@ -4,7 +4,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[CheckPermissions="bluetooth",
[CheckAnyPermissions="bluetooth",
Constructor(DOMString type, optional BluetoothLeDeviceEventInit eventInitDict)]
interface BluetoothLeDeviceEvent : Event
{

View File

@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
[CheckPermissions="bluetooth"]
[CheckAnyPermissions="bluetooth"]
interface BluetoothManager : EventTarget {
[Throws]
readonly attribute boolean enabled;

View File

@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
[CheckPermissions="bluetooth"]
[CheckAnyPermissions="bluetooth"]
interface BluetoothManager: EventTarget
{
readonly attribute BluetoothAdapter? defaultAdapter;

View File

@ -4,7 +4,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[CheckPermissions="bluetooth",
[CheckAnyPermissions="bluetooth",
Constructor(DOMString type,
optional BluetoothPairingEventInit eventInitDict)]
interface BluetoothPairingEvent : Event

View File

@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
[CheckPermissions="bluetooth"]
[CheckAnyPermissions="bluetooth"]
interface BluetoothPairingHandle
{
/**

View File

@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
[AvailableIn=CertifiedApps, CheckPermissions="bluetooth"]
[AvailableIn=CertifiedApps, CheckAnyPermissions="bluetooth"]
interface BluetoothPairingListener: EventTarget
{
attribute EventHandler ondisplaypasskeyreq;

View File

@ -6,7 +6,7 @@
[Constructor(DOMString type,
optional BluetoothStatusChangedEventInit eventInitDict),
CheckPermissions="bluetooth"]
CheckAnyPermissions="bluetooth"]
interface BluetoothStatusChangedEvent : Event
{
readonly attribute DOMString address;

View File

@ -30,32 +30,32 @@ BrowserElement implements BrowserElementPrivileged;
interface BrowserElementCommon {
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser embed-widgets"]
CheckAnyPermissions="browser embed-widgets"]
void setVisible(boolean visible);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser embed-widgets"]
CheckAnyPermissions="browser embed-widgets"]
DOMRequest getVisible();
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser embed-widgets"]
CheckAnyPermissions="browser embed-widgets"]
void setActive(boolean active);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser embed-widgets"]
CheckAnyPermissions="browser embed-widgets"]
boolean getActive();
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser embed-widgets"]
CheckAnyPermissions="browser embed-widgets"]
void addNextPaintListener(BrowserElementNextPaintEventCallback listener);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser embed-widgets"]
CheckAnyPermissions="browser embed-widgets"]
void removeNextPaintListener(BrowserElementNextPaintEventCallback listener);
};
@ -63,7 +63,7 @@ interface BrowserElementCommon {
interface BrowserElementPrivileged {
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
void sendMouseEvent(DOMString type,
unsigned long x,
unsigned long y,
@ -74,7 +74,7 @@ interface BrowserElementPrivileged {
[Throws,
Pref="dom.mozBrowserFramesEnabled",
Func="TouchEvent::PrefEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
void sendTouchEvent(DOMString type,
sequence<unsigned long> identifiers,
sequence<long> x,
@ -88,60 +88,60 @@ interface BrowserElementPrivileged {
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
void goBack();
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
void goForward();
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
void reload(optional boolean hardReload = false);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
void stop();
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
DOMRequest download(DOMString url,
optional BrowserElementDownloadOptions options);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
DOMRequest purgeHistory();
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
DOMRequest getScreenshot([EnforceRange] unsigned long width,
[EnforceRange] unsigned long height,
optional DOMString mimeType="");
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
void zoom(float zoom);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
DOMRequest getCanGoBack();
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
DOMRequest getCanGoForward();
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
DOMRequest getContentDimensions();
[Throws,
@ -156,23 +156,23 @@ interface BrowserElementPrivileged {
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
void findAll(DOMString searchString, BrowserFindCaseSensitivity caseSensitivity);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
void findNext(BrowserFindDirection direction);
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
void clearMatch();
// Additional |browser:universalxss| permission is required for executeScript API
[Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
DOMRequest executeScript(DOMString script,
optional BrowserElementExecuteScriptOptions options);

View File

@ -5,7 +5,7 @@
*/
[Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
interface BrowserElementAudioChannel : EventTarget {
readonly attribute AudioChannel name;
@ -32,6 +32,6 @@ interface BrowserElementAudioChannel : EventTarget {
partial interface BrowserElementPrivileged {
[Pure, Cached, Throws,
Pref="dom.mozBrowserFramesEnabled",
CheckPermissions="browser"]
CheckAnyPermissions="browser"]
readonly attribute sequence<BrowserElementAudioChannel> allowedAudioChannels;
};

View File

@ -5,7 +5,7 @@
*/
[Pref="dom.sms.enabled",
CheckPermissions="sms",
CheckAnyPermissions="sms",
AvailableIn="CertifiedApps"]
interface DOMMobileMessageError : DOMError {
readonly attribute (MozSmsMessage or MozMmsMessage) data;

View File

@ -4,6 +4,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.inputport.enabled", CheckPermissions="inputport", AvailableIn=CertifiedApps]
[Pref="dom.inputport.enabled", CheckAnyPermissions="inputport", AvailableIn=CertifiedApps]
interface DisplayPortInputPort : InputPort {
};

View File

@ -6,7 +6,7 @@
[Constructor(DOMString type, optional DownloadEventInit eventInitDict),
Pref="dom.mozDownloads.enabled",
CheckPermissions="downloads"]
CheckAnyPermissions="downloads"]
interface DownloadEvent : Event
{
readonly attribute DOMDownload? download;

View File

@ -19,7 +19,7 @@ enum DownloadState {
//
// XXXTODO: When we have a generic way to do feature detection in marketplace
// we will *STOP* using the pref and use CheckPermissions like
// we will *STOP* using the pref and use CheckAnyPermissions like
// DOMDownload and DownloadEvent.
//
[NoInterfaceObject,
@ -69,7 +69,7 @@ interface DOMDownloadManager : EventTarget {
[JSImplementation="@mozilla.org/downloads/download;1",
Pref="dom.mozDownloads.enabled",
CheckPermissions="downloads"]
CheckAnyPermissions="downloads"]
interface DOMDownload : EventTarget {
// The full size of the resource.
readonly attribute long long totalBytes;

View File

@ -5,7 +5,7 @@
[JSImplementation="@mozilla.org/dom/engineering-mode-api;1",
NavigatorProperty="engineeringMode",
AvailableIn=CertifiedApps,
CheckPermissions="engineering-mode"]
CheckAnyPermissions="engineering-mode"]
interface EngineeringMode : EventTarget {
Promise<DOMString> getValue(DOMString name);
Promise<void> setValue(DOMString name, DOMString value);

View File

@ -5,7 +5,7 @@
*/
[Constructor(DOMString type, optional ExternalAppEventInit eventInitDict),
CheckPermissions="external-app"]
CheckAnyPermissions="external-app"]
interface ExternalAppEvent : Event
{
readonly attribute DOMString data;

View File

@ -4,6 +4,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Pref="dom.inputport.enabled", CheckPermissions="inputport", AvailableIn=CertifiedApps]
[Pref="dom.inputport.enabled", CheckAnyPermissions="inputport", AvailableIn=CertifiedApps]
interface HDMIInputPort : InputPort {
};

View File

@ -4,7 +4,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[CheckPermissions="external-app"]
[CheckAnyPermissions="external-app"]
interface HTMLExtAppElement : HTMLElement {
// Gets the value of the property from a property bag
// that was provided to the external application.

View File

@ -5,7 +5,7 @@
[Constructor(DOMString errorName, short retryCount),
Pref="dom.icc.enabled",
CheckPermissions="mobileconnection",
CheckAnyPermissions="mobileconnection",
AvailableIn="CertifiedApps"]
interface IccCardLockError : DOMError {
readonly attribute short retryCount;

View File

@ -5,7 +5,7 @@
*/
[Pref="dom.icc.enabled",
CheckPermissions="mobileconnection",
CheckAnyPermissions="mobileconnection",
AvailableIn="CertifiedApps",
Constructor(DOMString type, optional IccChangeEventInit eventInitDict)]
interface IccChangeEvent : Event

View File

@ -6,7 +6,7 @@
* Reference https://wiki.mozilla.org/Input_Port_API#Basic_Port_Interface
*/
[Pref="dom.inputport.enabled", CheckPermissions="inputport", AvailableIn=CertifiedApps]
[Pref="dom.inputport.enabled", CheckAnyPermissions="inputport", AvailableIn=CertifiedApps]
interface InputPort : EventTarget {
readonly attribute DOMString id;
readonly attribute MediaStream stream;

View File

@ -6,7 +6,7 @@
* Reference https://wiki.mozilla.org/Input_Port_API#InputPortManager
*/
[Pref="dom.inputport.enabled", CheckPermissions="inputport", AvailableIn=CertifiedApps]
[Pref="dom.inputport.enabled", CheckAnyPermissions="inputport", AvailableIn=CertifiedApps]
interface InputPortManager {
[Throws]
Promise<sequence<InputPort>> getInputPorts();

View File

@ -5,7 +5,7 @@
*/
[Pref="dom.telephony.enabled",
CheckPermissions="telephony",
CheckAnyPermissions="telephony",
AvailableIn="CertifiedApps"]
interface MMICall {
[Throws]

View File

@ -9,7 +9,7 @@
* a particular region.
*/
[Pref="dom.cellbroadcast.enabled",
CheckPermissions="cellbroadcast",
CheckAnyPermissions="cellbroadcast",
AvailableIn="CertifiedApps"]
interface MozCellBroadcast : EventTarget
{

View File

@ -6,7 +6,7 @@
[Constructor(DOMString type, optional MozCellBroadcastEventInit eventInitDict),
Pref="dom.cellbroadcast.enabled",
CheckPermissions="cellbroadcast",
CheckAnyPermissions="cellbroadcast",
AvailableIn="CertifiedApps"]
interface MozCellBroadcastEvent : Event
{

View File

@ -12,7 +12,7 @@ enum CellBroadcastEtwsWarningType {"earthquake", "tsunami",
"earthquake-tsunami", "test", "other"};
[Pref="dom.cellbroadcast.enabled",
CheckPermissions="cellbroadcast",
CheckAnyPermissions="cellbroadcast",
AvailableIn="CertifiedApps"]
interface MozCellBroadcastMessage
{
@ -75,7 +75,7 @@ interface MozCellBroadcastMessage
};
[Pref="dom.cellbroadcast.enabled",
CheckPermissions="cellbroadcast",
CheckAnyPermissions="cellbroadcast",
AvailableIn="CertifiedApps"]
interface MozCellBroadcastEtwsInfo
{

View File

@ -140,7 +140,7 @@ dictionary IccCardLockRetryCount
};
[Pref="dom.icc.enabled",
CheckPermissions="mobileconnection",
CheckAnyPermissions="mobileconnection",
AvailableIn="CertifiedApps"]
interface MozIcc : EventTarget
{

View File

@ -5,7 +5,7 @@
enum IccType {"sim", "usim", "csim", "ruim"};
[Pref="dom.icc.enabled",
CheckPermissions="mobileconnection",
CheckAnyPermissions="mobileconnection",
AvailableIn="CertifiedApps"]
interface MozIccInfo {
/**
@ -45,7 +45,7 @@ interface MozIccInfo {
};
[Pref="dom.icc.enabled",
CheckPermissions="mobileconnection",
CheckAnyPermissions="mobileconnection",
AvailableIn="CertifiedApps"]
interface MozGsmIccInfo : MozIccInfo {
/**
@ -56,7 +56,7 @@ interface MozGsmIccInfo : MozIccInfo {
};
[Pref="dom.icc.enabled",
CheckPermissions="mobileconnection",
CheckAnyPermissions="mobileconnection",
AvailableIn="CertifiedApps"]
interface MozCdmaIccInfo : MozIccInfo {
/**

View File

@ -4,7 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
[Pref="dom.icc.enabled",
CheckPermissions="mobileconnection",
CheckAnyPermissions="mobileconnection",
AvailableIn="CertifiedApps"]
interface MozIccManager : EventTarget
{

View File

@ -5,7 +5,7 @@
*/
[Pref="dom.sms.enabled",
CheckPermissions="sms",
CheckAnyPermissions="sms",
AvailableIn="CertifiedApps",
Constructor(DOMString type, optional MozMessageDeletedEventInit eventInitDict)]
interface MozMessageDeletedEvent : Event

View File

@ -6,7 +6,7 @@
interface MozMmsMessage;
[Pref="dom.sms.enabled",
CheckPermissions="sms",
CheckAnyPermissions="sms",
AvailableIn="CertifiedApps",
Constructor(DOMString type, optional MozMmsEventInit eventInitDict)]
interface MozMmsEvent : Event

View File

@ -73,46 +73,46 @@ interface MozMobileConnection : EventTarget
* These two fields can be accessed by privileged applications with the
* 'mobilenetwork' permission.
*/
[CheckPermissions="mobilenetwork"]
[CheckAnyPermissions="mobilenetwork"]
readonly attribute DOMString lastKnownNetwork;
[CheckPermissions="mobilenetwork"]
[CheckAnyPermissions="mobilenetwork"]
readonly attribute DOMString lastKnownHomeNetwork;
/**
* Information about the voice connection.
*/
[CheckPermissions="mobileconnection"]
[CheckAnyPermissions="mobileconnection"]
readonly attribute MozMobileConnectionInfo voice;
/**
* Information about the data connection.
*/
[CheckPermissions="mobileconnection"]
[CheckAnyPermissions="mobileconnection"]
readonly attribute MozMobileConnectionInfo data;
/**
* Integrated Circuit Card Identifier of the SIM this mobile connection
* corresponds to.
*/
[CheckPermissions="mobileconnection"]
[CheckAnyPermissions="mobileconnection"]
readonly attribute DOMString? iccId;
/**
* The selection mode of the voice and data networks.
*/
[CheckPermissions="mobileconnection"]
[CheckAnyPermissions="mobileconnection"]
readonly attribute MobileNetworkSelectionMode? networkSelectionMode;
/**
* The current radio state.
*/
[CheckPermissions="mobileconnection"]
[CheckAnyPermissions="mobileconnection"]
readonly attribute MobileRadioState? radioState;
/**
* Array of network types that are supported by this radio.
*/
[Cached, Pure, CheckPermissions="mobileconnection"]
[Cached, Pure, CheckAnyPermissions="mobileconnection"]
readonly attribute sequence<MobileNetworkType> supportedNetworkTypes;
/**
@ -127,7 +127,7 @@ interface MozMobileConnection : EventTarget
* will be either 'RadioNotAvailable', 'RequestNotSupported', or
* 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest getNetworks();
/**
@ -144,7 +144,7 @@ interface MozMobileConnection : EventTarget
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'IllegalSIMorME', or 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest selectNetwork(MozMobileNetworkInfo network);
/**
@ -160,7 +160,7 @@ interface MozMobileConnection : EventTarget
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'IllegalSIMorME', or 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest selectNetworkAutomatically();
/**
@ -178,7 +178,7 @@ interface MozMobileConnection : EventTarget
* 'InvalidParameter', 'ModeNotSupported', 'IllegalSIMorME', or
* 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest setPreferredNetworkType(MobilePreferredNetworkType type);
/**
@ -196,7 +196,7 @@ interface MozMobileConnection : EventTarget
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'IllegalSIMorME', or 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest getPreferredNetworkType();
/**
@ -213,7 +213,7 @@ interface MozMobileConnection : EventTarget
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest setRoamingPreference(MobileRoamingMode mode);
/**
@ -229,7 +229,7 @@ interface MozMobileConnection : EventTarget
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'IllegalSIMorME', or 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest getRoamingPreference();
/**
@ -248,7 +248,7 @@ interface MozMobileConnection : EventTarget
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest setVoicePrivacyMode(boolean enabled);
/**
@ -263,7 +263,7 @@ interface MozMobileConnection : EventTarget
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'IllegalSIMorME', or 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest getVoicePrivacyMode();
/**
@ -281,7 +281,7 @@ interface MozMobileConnection : EventTarget
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest setCallForwardingOption(optional MozCallForwardingOptions options);
/**
@ -301,7 +301,7 @@ interface MozMobileConnection : EventTarget
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest getCallForwardingOption(unsigned short reason);
/**
@ -319,7 +319,7 @@ interface MozMobileConnection : EventTarget
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest setCallBarringOption(optional MozCallBarringOptions options);
/**
@ -341,7 +341,7 @@ interface MozMobileConnection : EventTarget
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest getCallBarringOption(optional MozCallBarringOptions options);
/**
@ -366,7 +366,7 @@ interface MozMobileConnection : EventTarget
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest changeCallBarringPassword(optional MozCallBarringOptions options);
/**
@ -383,7 +383,7 @@ interface MozMobileConnection : EventTarget
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'IllegalSIMorME', or 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest setCallWaitingOption(boolean enabled);
/**
@ -398,7 +398,7 @@ interface MozMobileConnection : EventTarget
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'IllegalSIMorME', or 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest getCallWaitingOption();
/**
@ -416,7 +416,7 @@ interface MozMobileConnection : EventTarget
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'InvalidParameter', 'IllegalSIMorME', or 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest setCallingLineIdRestriction(unsigned short mode);
/**
@ -432,7 +432,7 @@ interface MozMobileConnection : EventTarget
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'IllegalSIMorME', or 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest getCallingLineIdRestriction();
/**
@ -446,7 +446,7 @@ interface MozMobileConnection : EventTarget
* will be either 'RadioNotAvailable', 'RequestNotSupported',
* 'IllegalSIMorME', or 'GenericFailure'.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest exitEmergencyCbMode();
/**
@ -467,7 +467,7 @@ interface MozMobileConnection : EventTarget
* 'disabling'. Calling the function in above conditions will receive
* 'InvalidStateError' error.
*/
[Throws, CheckPermissions="mobileconnection"]
[Throws, CheckAnyPermissions="mobileconnection"]
DOMRequest setRadioEnabled(boolean enabled);
/**

View File

@ -115,7 +115,7 @@ dictionary SmscAddress {
};
[Pref="dom.sms.enabled",
CheckPermissions="sms",
CheckAnyPermissions="sms",
AvailableIn="CertifiedApps"]
interface MozMobileMessageManager : EventTarget
{

View File

@ -35,44 +35,44 @@ interface MozNFCManager {
* Returns success if given manifestUrl is registered for 'onpeerready',
* otherwise error
*/
[CheckPermissions="nfc-manager", AvailableIn=CertifiedApps]
[CheckAnyPermissions="nfc-manager", AvailableIn=CertifiedApps]
Promise<boolean> checkP2PRegistration(DOMString manifestUrl);
/**
* Notify that user has accepted to share nfc message on P2P UI
*/
[CheckPermissions="nfc-manager", AvailableIn=CertifiedApps]
[CheckAnyPermissions="nfc-manager", AvailableIn=CertifiedApps]
void notifyUserAcceptedP2P(DOMString manifestUrl);
/**
* Notify the status of sendFile operation
*/
[CheckPermissions="nfc-manager", AvailableIn=CertifiedApps]
[CheckAnyPermissions="nfc-manager", AvailableIn=CertifiedApps]
void notifySendFileStatus(octet status, DOMString requestId);
/**
* Power on the NFC hardware and start polling for NFC tags or devices.
*/
[CheckPermissions="nfc-manager", AvailableIn=CertifiedApps]
[CheckAnyPermissions="nfc-manager", AvailableIn=CertifiedApps]
Promise<void> startPoll();
/**
* Stop polling for NFC tags or devices. i.e. enter low power mode.
*/
[CheckPermissions="nfc-manager", AvailableIn=CertifiedApps]
[CheckAnyPermissions="nfc-manager", AvailableIn=CertifiedApps]
Promise<void> stopPoll();
/**
* Power off the NFC hardware.
*/
[CheckPermissions="nfc-manager", AvailableIn=CertifiedApps]
[CheckAnyPermissions="nfc-manager", AvailableIn=CertifiedApps]
Promise<void> powerOff();
};
[JSImplementation="@mozilla.org/nfc/manager;1",
NavigatorProperty="mozNfc",
Func="Navigator::HasNFCSupport",
CheckPermissions="nfc nfc-share",
CheckAnyPermissions="nfc nfc-share",
AvailableIn="PrivilegedApps",
UnsafeInPrerendering]
interface MozNFC : EventTarget {
@ -86,7 +86,7 @@ interface MozNFC : EventTarget {
* to share data to the NFCPeer object by calling mozNFC.notifyUserAcceptedP2P.
* The event will be type of NFCPeerEvent.
*/
[CheckPermissions="nfc-share", AvailableIn=CertifiedApps]
[CheckAnyPermissions="nfc-share", AvailableIn=CertifiedApps]
attribute EventHandler onpeerready;
/**

View File

@ -24,7 +24,7 @@ interface MozNFCPeer {
/**
* Send file to peer device.
*/
[Throws, CheckPermissions="nfc-share", AvailableIn="CertifiedApps"]
[Throws, CheckAnyPermissions="nfc-share", AvailableIn="CertifiedApps"]
Promise<void> sendFile(Blob blob);
};

View File

@ -5,7 +5,7 @@
*/
[Constructor(DOMString type, optional MozNFCPeerEventInit eventInitDict),
Func="Navigator::HasNFCSupport", CheckPermissions="nfc nfc-share",
Func="Navigator::HasNFCSupport", CheckAnyPermissions="nfc nfc-share",
AvailableIn="PrivilegedApps"]
interface MozNFCPeerEvent : Event
{

View File

@ -5,7 +5,7 @@
*/
[Constructor(DOMString type, optional MozNFCTagEventInit eventInitDict),
Func="Navigator::HasNFCSupport", CheckPermissions="nfc",
Func="Navigator::HasNFCSupport", CheckAnyPermissions="nfc",
AvailableIn="PrivilegedApps"]
interface MozNFCTagEvent : Event
{

View File

@ -33,7 +33,7 @@ dictionary NetworkStatsAlarmOptions
[JSImplementation="@mozilla.org/networkstats;1",
ChromeOnly,
CheckPermissions="networkstats-manage",
CheckAnyPermissions="networkstats-manage",
Pref="dom.mozNetworkStats.enabled"]
interface MozNetworkStats {
/**

View File

@ -4,7 +4,7 @@
[JSImplementation="@mozilla.org/networkstatsalarm;1",
ChromeOnly,
CheckPermissions="networkstats-manage",
CheckAnyPermissions="networkstats-manage",
Pref="dom.mozNetworkStats.enabled"]
interface MozNetworkStatsAlarm {
readonly attribute unsigned long alarmId;

View File

@ -4,7 +4,7 @@
[JSImplementation="@mozilla.org/networkStatsdata;1",
ChromeOnly,
CheckPermissions="networkstats-manage",
CheckAnyPermissions="networkstats-manage",
Pref="dom.mozNetworkStats.enabled"]
interface MozNetworkStatsData {
readonly attribute unsigned long rxBytes; // Received bytes.

View File

@ -12,7 +12,7 @@ dictionary NetworkInterface {
*/
[Constructor(optional NetworkInterface networkinterface),
JSImplementation="@mozilla.org/networkstatsinterface;1",
CheckPermissions="networkstats-manage",
CheckAnyPermissions="networkstats-manage",
Pref="dom.mozNetworkStats.enabled"]
interface MozNetworkStatsInterface {
readonly attribute long type;

View File

@ -5,7 +5,7 @@
*/
[Constructor(DOMString type, optional MozSettingsTransactionEventInit eventInitDict),
CheckPermissions="settings-api-read settings-api-write"]
CheckAnyPermissions="settings-api-read settings-api-write"]
interface MozSettingsTransactionEvent : Event
{
readonly attribute DOMString? error;

View File

@ -6,7 +6,7 @@
interface MozSmsMessage;
[Pref="dom.sms.enabled",
CheckPermissions="sms",
CheckAnyPermissions="sms",
AvailableIn="CertifiedApps",
Constructor(DOMString type, optional MozSmsEventInit eventInitDict)]
interface MozSmsEvent : Event

View File

@ -55,7 +55,7 @@ dictionary MozStkIconContainer
};
[Pref="dom.icc.enabled",
CheckPermissions="mobileconnection",
CheckAnyPermissions="mobileconnection",
AvailableIn="CertifiedApps",
Constructor(DOMString type, optional MozStkCommandEventInit eventInitDict)]
interface MozStkCommandEvent : Event

View File

@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
[Pref="dom.voicemail.enabled",
CheckPermissions="voicemail",
CheckAnyPermissions="voicemail",
AvailableIn="CertifiedApps"]
interface MozVoicemail : EventTarget
{

View File

@ -6,7 +6,7 @@
[Constructor(DOMString type, optional MozVoicemailEventInit eventInitDict),
Pref="dom.voicemail.enabled",
CheckPermissions="voicemail",
CheckAnyPermissions="voicemail",
AvailableIn="CertifiedApps"]
interface MozVoicemailEvent : Event
{

View File

@ -5,7 +5,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
[Pref="dom.voicemail.enabled",
CheckPermissions="voicemail",
CheckAnyPermissions="voicemail",
AvailableIn="CertifiedApps"]
interface MozVoicemailStatus
{

View File

@ -90,10 +90,10 @@ interface NavigatorStorageUtils {
[NoInterfaceObject]
interface NavigatorFeatures {
[CheckPermissions="feature-detection", Throws]
[CheckAnyPermissions="feature-detection", Throws]
Promise<any> getFeature(DOMString name);
[CheckPermissions="feature-detection", Throws]
[CheckAnyPermissions="feature-detection", Throws]
Promise<any> hasFeature(DOMString name);
};
@ -170,8 +170,8 @@ dictionary MobileIdOptions {
[NoInterfaceObject]
interface NavigatorMobileId {
// Ideally we would use [CheckPermissions] here, but the "mobileid"
// permission is set to PROMPT_ACTION and [CheckPermissions] only checks
// Ideally we would use [CheckAnyPermissions] here, but the "mobileid"
// permission is set to PROMPT_ACTION and [CheckAnyPermissions] only checks
// for ALLOW_ACTION.
// XXXbz what is this promise resolved with?
[NewObject, Func="Navigator::HasMobileIdSupport"]
@ -194,7 +194,7 @@ partial interface Navigator {
readonly attribute boolean cookieEnabled;
[Throws]
readonly attribute DOMString buildID;
[Throws, CheckPermissions="power", UnsafeInPrerendering]
[Throws, CheckAnyPermissions="power", UnsafeInPrerendering]
readonly attribute MozPowerManager mozPower;
// WebKit/Blink/Trident/Presto support this.
@ -204,13 +204,13 @@ partial interface Navigator {
/**
* Navigator requests to add an idle observer to the existing window.
*/
[Throws, CheckPermissions="idle"]
[Throws, CheckAnyPermissions="idle"]
void addIdleObserver(MozIdleObserver aIdleObserver);
/**
* Navigator requests to remove an idle observer from the existing window.
*/
[Throws, CheckPermissions="idle"]
[Throws, CheckAnyPermissions="idle"]
void removeIdleObserver(MozIdleObserver aIdleObserver);
/**
@ -268,7 +268,7 @@ partial interface Navigator {
#ifdef MOZ_WEBSMS_BACKEND
partial interface Navigator {
[CheckPermissions="sms", Pref="dom.sms.enabled", AvailableIn="CertifiedApps"]
[CheckAnyPermissions="sms", Pref="dom.sms.enabled", AvailableIn="CertifiedApps"]
readonly attribute MozMobileMessageManager? mozMobileMessage;
};
#endif
@ -303,30 +303,30 @@ partial interface Navigator {
#ifdef MOZ_B2G_RIL
partial interface Navigator {
[Throws, Pref="dom.mobileconnection.enabled", CheckPermissions="mobileconnection mobilenetwork", UnsafeInPrerendering]
[Throws, Pref="dom.mobileconnection.enabled", CheckAnyPermissions="mobileconnection mobilenetwork", UnsafeInPrerendering]
readonly attribute MozMobileConnectionArray mozMobileConnections;
};
partial interface Navigator {
[Throws, Pref="dom.cellbroadcast.enabled", CheckPermissions="cellbroadcast",
[Throws, Pref="dom.cellbroadcast.enabled", CheckAnyPermissions="cellbroadcast",
AvailableIn="CertifiedApps", UnsafeInPrerendering]
readonly attribute MozCellBroadcast mozCellBroadcast;
};
partial interface Navigator {
[Throws, Pref="dom.voicemail.enabled", CheckPermissions="voicemail",
[Throws, Pref="dom.voicemail.enabled", CheckAnyPermissions="voicemail",
AvailableIn="CertifiedApps", UnsafeInPrerendering]
readonly attribute MozVoicemail mozVoicemail;
};
partial interface Navigator {
[Throws, Pref="dom.icc.enabled", CheckPermissions="mobileconnection",
[Throws, Pref="dom.icc.enabled", CheckAnyPermissions="mobileconnection",
AvailableIn="CertifiedApps", UnsafeInPrerendering]
readonly attribute MozIccManager? mozIccManager;
};
partial interface Navigator {
[Throws, Pref="dom.telephony.enabled", CheckPermissions="telephony", UnsafeInPrerendering]
[Throws, Pref="dom.telephony.enabled", CheckAnyPermissions="telephony", UnsafeInPrerendering]
readonly attribute Telephony? mozTelephony;
};
#endif // MOZ_B2G_RIL
@ -346,14 +346,14 @@ partial interface Navigator {
#ifdef MOZ_B2G_BT
partial interface Navigator {
[Throws, CheckPermissions="bluetooth", UnsafeInPrerendering]
[Throws, CheckAnyPermissions="bluetooth", UnsafeInPrerendering]
readonly attribute BluetoothManager mozBluetooth;
};
#endif // MOZ_B2G_BT
#ifdef MOZ_B2G_FM
partial interface Navigator {
[Throws, CheckPermissions="fmradio", UnsafeInPrerendering]
[Throws, CheckAnyPermissions="fmradio", UnsafeInPrerendering]
readonly attribute FMRadio mozFMRadio;
};
#endif // MOZ_B2G_FM
@ -361,7 +361,7 @@ partial interface Navigator {
#ifdef MOZ_TIME_MANAGER
// nsIDOMMozNavigatorTime
partial interface Navigator {
[Throws, CheckPermissions="time", UnsafeInPrerendering]
[Throws, CheckAnyPermissions="time", UnsafeInPrerendering]
readonly attribute MozTimeManager mozTime;
};
#endif // MOZ_TIME_MANAGER
@ -416,12 +416,12 @@ partial interface Navigator {
};
partial interface Navigator {
[Pref="dom.tv.enabled", CheckPermissions="tv", Func="Navigator::HasTVSupport"]
[Pref="dom.tv.enabled", CheckAnyPermissions="tv", Func="Navigator::HasTVSupport"]
readonly attribute TVManager? tv;
};
partial interface Navigator {
[Throws, Pref="dom.inputport.enabled", CheckPermissions="inputport", AvailableIn=CertifiedApps]
[Throws, Pref="dom.inputport.enabled", CheckAnyPermissions="inputport", AvailableIn=CertifiedApps]
readonly attribute InputPortManager inputPortManager;
};

View File

@ -3,7 +3,7 @@
* You can obtain at http://mozilla.org/MPL/2.0/. */
[JSImplementation="@mozilla.org/permissionSettings;1",
CheckPermissions="permissions",
CheckAnyPermissions="permissions",
Pref="dom.mozPermissionSettings.enabled",
NavigatorProperty="mozPermissionSettings"]
interface PermissionSettings

View File

@ -6,7 +6,7 @@
[JSImplementation="@mozilla.org/phoneNumberService;1",
NavigatorProperty="mozPhoneNumberService",
CheckPermissions="phonenumberservice"]
CheckAnyPermissions="phonenumberservice"]
interface PhoneNumberService {
DOMRequest fuzzyMatch([TreatNullAs=EmptyString] optional DOMString number1 = "",
[TreatNullAs=EmptyString] optional DOMString number2= "");

View File

@ -13,7 +13,7 @@ dictionary PresentationDeviceInfo {
[NavigatorProperty="mozPresentationDeviceInfo",
JSImplementation="@mozilla.org/presentation-device/deviceInfo;1",
Pref="dom.presentation.enabled",
CheckPermissions="presentation-device-manage"]
CheckAnyPermissions="presentation-device-manage"]
interface PresentationDeviceInfoManager : EventTarget {
// notify if any device updated.
attribute EventHandler ondevicechange;

View File

@ -6,7 +6,7 @@
[AvailableIn=CertifiedApps,
Pref="dom.requestSync.enabled",
CheckPermissions="requestsync-manager",
CheckAnyPermissions="requestsync-manager",
JSImplementation="@mozilla.org/dom/request-sync-task-app;1"]
interface RequestSyncApp {
readonly attribute USVString origin;
@ -19,7 +19,7 @@ enum RequestSyncTaskPolicyState { "enabled", "disabled", "wifiOnly" };
// Like a normal task, but with info about the app.
[AvailableIn=CertifiedApps,
Pref="dom.requestSync.enabled",
CheckPermissions="requestsync-manager",
CheckAnyPermissions="requestsync-manager",
JSImplementation="@mozilla.org/dom/request-sync-task-manager;1"]
interface RequestSyncTask {
// This object describes the app that is owning the task.
@ -48,7 +48,7 @@ interface RequestSyncTask {
[NavigatorProperty="syncManager",
AvailableIn=CertifiedApps,
Pref="dom.requestSync.enabled",
CheckPermissions="requestsync-manager",
CheckAnyPermissions="requestsync-manager",
JSImplementation="@mozilla.org/dom/request-sync-manager;1"]
// This interface will be used only by the B2G SystemApp
interface RequestSyncManager {

View File

@ -4,7 +4,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[CheckPermissions="resourcestats-manage",
[CheckAnyPermissions="resourcestats-manage",
Pref="dom.resource_stats.enabled",
AvailableIn="CertifiedApps",
JSImplementation="@mozilla.org/networkStatsData;1"]
@ -15,7 +15,7 @@ interface NetworkStatsData
readonly attribute DOMTimeStamp timestamp; // timestamp of the record
};
[CheckPermissions="resourcestats-manage",
[CheckAnyPermissions="resourcestats-manage",
Pref="dom.resource_stats.enabled",
AvailableIn="CertifiedApps",
JSImplementation="@mozilla.org/powerStatsData;1"]
@ -25,7 +25,7 @@ interface PowerStatsData
readonly attribute DOMTimeStamp timestamp; // timestamp of the record
};
[CheckPermissions="resourcestats-manage",
[CheckAnyPermissions="resourcestats-manage",
Pref="dom.resource_stats.enabled",
AvailableIn="CertifiedApps",
JSImplementation="@mozilla.org/resourceStats;1"]

View File

@ -70,7 +70,7 @@ dictionary ResourceStatsAlarmOptions
any data;
};
[CheckPermissions="resourcestats-manage",
[CheckAnyPermissions="resourcestats-manage",
Pref="dom.resource_stats.enabled",
AvailableIn="CertifiedApps",
JSImplementation="@mozilla.org/resourceStatsAlarm;1"]
@ -112,7 +112,7 @@ interface ResourceStatsAlarm
readonly attribute any data;
};
[CheckPermissions="resourcestats-manage",
[CheckAnyPermissions="resourcestats-manage",
Pref="dom.resource_stats.enabled",
Constructor(ResourceType type),
AvailableIn="CertifiedApps",

View File

@ -37,7 +37,7 @@ dictionary SECommand {
};
[Pref="dom.secureelement.enabled",
CheckPermissions="secureelement-manage",
CheckAnyPermissions="secureelement-manage",
AvailableIn="CertifiedApps",
JSImplementation="@mozilla.org/secureelement/reader;1"]
interface SEReader {
@ -66,7 +66,7 @@ interface SEReader {
};
[Pref="dom.secureelement.enabled",
CheckPermissions="secureelement-manage",
CheckAnyPermissions="secureelement-manage",
AvailableIn="CertifiedApps",
JSImplementation="@mozilla.org/secureelement/session;1"]
interface SESession {
@ -102,7 +102,7 @@ interface SESession {
};
[Pref="dom.secureelement.enabled",
CheckPermissions="secureelement-manage",
CheckAnyPermissions="secureelement-manage",
AvailableIn="CertifiedApps",
JSImplementation="@mozilla.org/secureelement/channel;1"]
interface SEChannel {
@ -142,7 +142,7 @@ interface SEChannel {
};
[Pref="dom.secureelement.enabled",
CheckPermissions="secureelement-manage",
CheckAnyPermissions="secureelement-manage",
AvailableIn="CertifiedApps",
JSImplementation="@mozilla.org/secureelement/response;1"]
interface SEResponse {

View File

@ -5,7 +5,7 @@
/* Copyright © 2014 Deutsche Telekom, Inc. */
[Pref="dom.secureelement.enabled",
CheckPermissions="secureelement-manage",
CheckAnyPermissions="secureelement-manage",
AvailableIn="CertifiedApps",
JSImplementation="@mozilla.org/secureelement/manager;1",
NavigatorProperty="seManager",

View File

@ -6,7 +6,7 @@
[NavigatorProperty="push",
JSImplementation="@mozilla.org/push/PushManager;1",
CheckPermissions="push",
CheckAnyPermissions="push",
Pref="services.push.enabled"]
interface SimplePushManager {
DOMRequest register();

View File

@ -16,7 +16,7 @@ dictionary SystemUpdatePackageInfo {
};
[JSImplementation="@mozilla.org/system-update-provider;1",
CheckPermissions="system-update",
CheckAnyPermissions="system-update",
Pref="dom.system_update.enabled"]
interface SystemUpdateProvider : EventTarget {
readonly attribute DOMString name;
@ -37,7 +37,7 @@ interface SystemUpdateProvider : EventTarget {
[NavigatorProperty="updateManager",
JSImplementation="@mozilla.org/system-update-manager;1",
CheckPermissions="system-update",
CheckAnyPermissions="system-update",
Pref="dom.system_update.enabled"]
interface SystemUpdateManager {
Promise<sequence<SystemUpdateProviderInfo>> getProviders();

View File

@ -18,7 +18,7 @@ dictionary TVGetProgramsOptions {
unsigned long long duration;
};
[Pref="dom.tv.enabled", CheckPermissions="tv", Func="Navigator::HasTVSupport"]
[Pref="dom.tv.enabled", CheckAnyPermissions="tv", Func="Navigator::HasTVSupport"]
interface TVChannel : EventTarget {
[Throws]
Promise<sequence<TVProgram>> getPrograms(optional TVGetProgramsOptions options);

View File

@ -12,7 +12,7 @@ dictionary TVCurrentChannelChangedEventInit : EventInit {
};
[Pref="dom.tv.enabled",
CheckPermissions="tv",
CheckAnyPermissions="tv",
Func="Navigator::HasTVSupport",
Constructor(DOMString type, optional TVCurrentChannelChangedEventInit eventInitDict)]
interface TVCurrentChannelChangedEvent : Event {

View File

@ -12,7 +12,7 @@ dictionary TVCurrentSourceChangedEventInit : EventInit {
};
[Pref="dom.tv.enabled",
CheckPermissions="tv",
CheckAnyPermissions="tv",
Func="Navigator::HasTVSupport",
Constructor(DOMString type, optional TVCurrentSourceChangedEventInit eventInitDict)]
interface TVCurrentSourceChangedEvent : Event {

View File

@ -12,7 +12,7 @@ dictionary TVEITBroadcastedEventInit : EventInit {
};
[Pref="dom.tv.enabled",
CheckPermissions="tv",
CheckAnyPermissions="tv",
Func="Navigator::HasTVSupport",
Constructor(DOMString type, optional TVEITBroadcastedEventInit eventInitDict)]
interface TVEITBroadcastedEvent : Event {

View File

@ -7,7 +7,7 @@
* http://seanyhlin.github.io/TV-Manager-API/
*/
[Pref="dom.tv.enabled", CheckPermissions="tv", Func="Navigator::HasTVSupport"]
[Pref="dom.tv.enabled", CheckAnyPermissions="tv", Func="Navigator::HasTVSupport"]
interface TVManager : EventTarget {
[Throws]
Promise<sequence<TVTuner>> getTuners();

View File

@ -7,7 +7,7 @@
* http://seanyhlin.github.io/TV-Manager-API/
*/
[Pref="dom.tv.enabled", CheckPermissions="tv", Func="Navigator::HasTVSupport"]
[Pref="dom.tv.enabled", CheckAnyPermissions="tv", Func="Navigator::HasTVSupport"]
interface TVProgram {
sequence<DOMString> getAudioLanguages();

View File

@ -20,7 +20,7 @@ dictionary TVScanningStateChangedEventInit : EventInit {
};
[Pref="dom.tv.enabled",
CheckPermissions="tv",
CheckAnyPermissions="tv",
Func="Navigator::HasTVSupport",
Constructor(DOMString type, optional TVScanningStateChangedEventInit eventInitDict)]
interface TVScanningStateChangedEvent : Event {

View File

@ -33,7 +33,7 @@ dictionary TVStartScanningOptions {
boolean isRescanned;
};
[Pref="dom.tv.enabled", CheckPermissions="tv", Func="Navigator::HasTVSupport"]
[Pref="dom.tv.enabled", CheckAnyPermissions="tv", Func="Navigator::HasTVSupport"]
interface TVSource : EventTarget {
[Throws]
Promise<sequence<TVChannel>> getChannels();

View File

@ -7,7 +7,7 @@
* http://seanyhlin.github.io/TV-Manager-API/
*/
[Pref="dom.tv.enabled", CheckPermissions="tv", Func="Navigator::HasTVSupport"]
[Pref="dom.tv.enabled", CheckAnyPermissions="tv", Func="Navigator::HasTVSupport"]
interface TVTuner : EventTarget {
[Throws]
sequence<TVSourceType> getSupportedSourceTypes();

View File

@ -10,7 +10,7 @@
//Bug 1056444: This interface should be removed after UDPSocket.input/UDPSocket.output are ready.
[Constructor(DOMString type, optional UDPMessageEventInit eventInitDict),
Pref="dom.udpsocket.enabled",
CheckPermissions="udp-socket"]
CheckAnyPermissions="udp-socket"]
interface UDPMessageEvent : Event {
readonly attribute DOMString remoteAddress;
readonly attribute unsigned short remotePort;

View File

@ -19,7 +19,7 @@ dictionary UDPOptions {
[Constructor (optional UDPOptions options),
Pref="dom.udpsocket.enabled",
CheckPermissions="udp-socket"]
CheckAnyPermissions="udp-socket"]
interface UDPSocket : EventTarget {
readonly attribute DOMString? localAddress;
readonly attribute unsigned short? localPort;

View File

@ -5,7 +5,7 @@
*/
[Pref="dom.telephony.enabled",
CheckPermissions="telephony",
CheckAnyPermissions="telephony",
AvailableIn="CertifiedApps",
Constructor(DOMString type, optional USSDReceivedEventInit eventInitDict)]
interface USSDReceivedEvent : Event

View File

@ -5,7 +5,7 @@
*/
[Pref="dom.telephony.enabled",
CheckPermissions="telephony",
CheckAnyPermissions="telephony",
AvailableIn="CertifiedApps",
Constructor(unsigned long serviceId)]
interface USSDSession {