Bug 1731994: part 2) Add some documentation to ContentPermissionRequestBase's constructor. r=edgar

Differential Revision: https://phabricator.services.mozilla.com/D126338
This commit is contained in:
Mirko Brodesser 2021-09-23 08:48:17 +00:00
parent 34c70a5402
commit c3adf90c7d

View File

@ -136,6 +136,7 @@ class ContentPermissionRequestBase : public nsIContentPermissionRequest {
void RequestDelayedTask(nsIEventTarget* aTarget, DelayedTaskType aType);
protected:
// @param aPrefName see `mPrefName`.
ContentPermissionRequestBase(nsIPrincipal* aPrincipal,
nsPIDOMWindowInner* aWindow,
const nsACString& aPrefName,
@ -146,6 +147,13 @@ class ContentPermissionRequestBase : public nsIContentPermissionRequest {
nsCOMPtr<nsIPrincipal> mTopLevelPrincipal;
nsCOMPtr<nsPIDOMWindowInner> mWindow;
RefPtr<PermissionDelegateHandler> mPermissionHandler;
// The prefix of a pref which allows tests to bypass showing the prompt.
// Tests will have to set both of
// ${mPrefName}.prompt.testing and
// ${mPrefName}.prompt.testing.allow
// to either true or false. If no such testing is required, mPrefName may be
// empty.
const nsCString mPrefName;
const nsCString mType;
bool mIsHandlingUserInput;