Files
palemoon27/caps/nsIDomainPolicy.idl
roytam1 253db3c3f9 import change from rmottola/Arctic-Fox:
- Bug 1146557 P1 Fix CacheStorage and Cache to QI to nsISupports correctly. r=ehsan (b56ba80cd)
- Bug 1146557 P2 Flip dom.caches.enabled to true on non-release builds. (b1ac38779)
- Bug 1126014 - DomainPolicy support for e10s. r=mrbkap (484fa7f8d)
- Bug 1092102 - Implement worker debugger runnables; (cfb3cb53d)
- Bug 1092102 - Implement WorkerDebugger.initialize; (24f467b14)
- Bug 1092102 - Implement WorkerDebugger.postMessage; (ad69a161d)
- Bug 1092102 - Implement WorkerDebuggerGlobalScope.reportError; (f937913f2)
- Bug 1092102 - Implement WorkerDebuggerGlobalScope.enterEventLoop; (d1d0ad392)
- Bug 1092102 - Implement WorkerDebuggerGlobalScope.setImmediate (a22de0f0d)
- Bug 1092102 - Implement WorkerDebuggerGlobalScope.createSandbox (d281de130)
- Bug 1092102 followup: Add missing 'override' annotation on DebuggerImmediateRunnable::IsDebuggerRunnable(). (b4d053cfe)
- Bug 1092102, followup 2: Add missing 'override' annotation to WorkerDebuggerSandboxPrivate::GetGlobalJSObject() (and 'virtual', for consistency). (72c9f3c84)
- Bug 1092102 - Rename Suspend/Resume to Freeze/Thaw; (a7f2b5c11)
- Bug 1092102 - Implement WorkerDebugger.isFrozen; (805ba0e9e)
2019-06-29 10:04:40 +08:00

81 lines
2.4 KiB
Plaintext

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "nsISupports.idl"
interface nsIURI;
interface nsIDomainSet;
%{ C++
namespace mozilla {
namespace dom {
class DomainPolicyClone;
}
}
%}
[ptr] native DomainPolicyClonePtr(mozilla::dom::DomainPolicyClone);
/*
* When a domain policy is instantiated by invoking activateDomainPolicy() on
* nsIScriptSecurityManager, these domain sets are consulted when each new
* global is created (they have no effect on already-created globals).
* If javascript is globally enabled with |javascript.enabled|, the blacklists
* are consulted. If globally disabled, the whitelists are consulted. Lookups
* on blacklist and whitelist happen with contains(), and lookups on
* superBlacklist and superWhitelist happen with containsSuperDomain().
*
* When deactivate() is invoked, the domain sets are emptied, and the
* nsIDomainPolicy ceases to have any effect on the system.
*/
[scriptable, builtinclass, uuid(82b24a20-6701-4d40-a0f9-f5dc7321b555)]
interface nsIDomainPolicy : nsISupports
{
readonly attribute nsIDomainSet blacklist;
readonly attribute nsIDomainSet superBlacklist;
readonly attribute nsIDomainSet whitelist;
readonly attribute nsIDomainSet superWhitelist;
void deactivate();
[noscript, notxpcom] void cloneDomainPolicy(in DomainPolicyClonePtr aClone);
[noscript, notxpcom] void applyClone(in DomainPolicyClonePtr aClone);
};
[scriptable, builtinclass, uuid(665c981b-0a0f-4229-ac06-a826e02d4f69)]
interface nsIDomainSet : nsISupports
{
/*
* The type of the set. See: DomainSetType
*/
[noscript] readonly attribute uint32_t type;
/*
* Add a domain to the set. No-op if it already exists.
*/
void add(in nsIURI aDomain);
/*
* Remove a domain from the set. No-op if it doesn't exist.
*/
void remove(in nsIURI aDomain);
/*
* Remove all entries from the set.
*/
void clear();
/*
* Returns true if a given domain is in the set.
*/
bool contains(in nsIURI aDomain);
/*
* Returns true if a given domain is a subdomain of one of the entries in
* the set.
*/
bool containsSuperDomain(in nsIURI aDomain);
};